staxdb / humhub-modules-external-calendar Goto Github PK
View Code? Open in Web Editor NEWHumhub calendar extension for syncing external calendar in iCal-Format
Humhub calendar extension for syncing external calendar in iCal-Format
Hello, I do not know if I post in the right place ...
I installed the extension, but once activated, I have an error message on all the spaces, the news feed is the calendar already in place. It tells me server problem and I have no access to anything. Everything comes back in order if I deactivate external calendar.
Thanks for the return
baptiste
Hey,
I've test the external Calender and made a mistake in my ICS-File.
So i've a duplicated Event in the Calender.
I've deleted the Events in HumHub and then clicked on Sync now. but the Event dosn't created again.
If i change the UID from this Event in my ics-File a new Event was created.
Now, I've delete my "Test"-Calendar and created new one with the same ICS-File-URL and no Events are shown in my HumHub Calender. Only if i Update the UID from 1-2024 to 1.2024
Any Ideas??
Procedure:
Integrate and synchronize external calendar
==> OK: Appointments are displayed
Delete external integration
==> OK: appointments are no longer displayed
Integrate and synchronize external calendar again
==> BUG: Appointments are not displayed
Moved to: humhub-contrib#32
There is a problem with the "upcoming events"-widget from the original calendar module:
If we have a one-day event, the widget will display it as two days. If we have more than one day, but also whole-day events, the data displayed is also incorrect.
Installed this module into HumHub. Was able activate it successfully. But when I add an iCal link from Google Calendar and save, I get error screen saying 'Class 'Carbon\Carbon' not found'. I don't know very much about this stuff but I thought I would share if for some reason it was helpful :)
Exception
Error
Class 'Carbon\Carbon' not found
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/vendors/johngrogg/ics-parser/src/ICal/ICal.php at line 2107
2098209921002101210221032104210521062107210821092110211121122113211421152116 if ($key === 'TZID') {
$currentTimeZone = $subArray[$key];
} elseif (is_numeric($key)) {
$icalDate = $subArray[$key];
if (substr($icalDate, -1) === 'Z') {
$currentTimeZone = self::TIME_ZONE_UTC;
}
$output[] = new Carbon($icalDate, $currentTimeZone);
if ($key === $finalKey) {
// Reset to default
$currentTimeZone = $this->defaultTimeZone;
}
}
}
}
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/vendors/johngrogg/ics-parser/src/ICal/ICal.php at line 931 – ICal\ICal::parseExdates(['DTSTART_array' => [['TZID' => 'America/Edmonton'], '20160317T080000', 1458223200, 'TZID=America/Edmonton:20160317T0...'], 'DTSTART' => '20160317T080000', 'DTEND_array' => [['TZID' => 'America/Edmonton'], '20160317T170000', 1458255600, 'TZID=America/Edmonton:20160317T1...'], 'DTEND' => '20160317T170000', ...])
925926927928929930931932933934935936937
$untilDefault = date_create('now');
$untilDefault->modify($this->defaultSpan . ' year');
$untilDefault->setTime(23, 59, 59); // End of the day
// Compute EXDATEs
$exdates = $this->parseExdates($anEvent);
if (isset($rrules['UNTIL'])) {
// Get Until
$until = strtotime($rrules['UNTIL']);
} elseif (isset($rrules['COUNT'])) {
$countOrig = (is_numeric($rrules['COUNT']) && $rrules['COUNT'] > 1) ? $rrules['COUNT'] : 0;
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/vendors/johngrogg/ics-parser/src/ICal/ICal.php at line 402 – ICal\ICal::processRecurrences()
396397398399400401402403404405406407408 }
}
$this->processEvents();
if (!$this->skipRecurrence) {
$this->processRecurrences();
}
$this->processDateConversions();
}
}
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/vendors/johngrogg/ics-parser/src/ICal/ICal.php at line 245 – ICal\ICal::initLines(['BEGIN:VCALENDAR', 'PRODID:-//Google Inc//Google Cal...', 'VERSION:2.0', 'CALSCALE:GREGORIAN', ...])
239240241242243244245246247248249250251 if ($this->isFileOrUrl($file)) {
$lines = $this->fileOrUrl($file);
} else {
$lines = is_array($file) ? $file : array($file);
}
$this->initLines($lines);
}
}
}
/**
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/models/ExternalCalendar.php at line 167 – ICal\ICal::__construct(['https://calendar.google.com/cale...'], ['defaultTimeZone' => 'America/Edmonton'])
161162163164165166167168169170171172173 * @param array $params parameters
*/
public function validateURL($attribute, $params)
{
try {
new ICal($this->url, array(
'defaultTimeZone' => Yii::$app->timeZone,
));
} catch (\Exception $e) {
$this->addError($attribute, Yii::t('ExternalCalendarModule.sync_result', "No valid ical url! Try an url with http / https."));
}
}
humhub\modules\external_calendar\models\ExternalCalendar::validateURL('url', null, yii\validators\InlineValidator)
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/validators/InlineValidator.php at line 72 – call_user_func([humhub\modules\external_calendar\models\ExternalCalendar, 'validateURL'], 'url', null, yii\validators\InlineValidator)
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/validators/Validator.php at line 266 – yii\validators\InlineValidator::validateAttribute(humhub\modules\external_calendar\models\ExternalCalendar, 'url')
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/base/Model.php at line 358 – yii\validators\Validator::validateAttributes(humhub\modules\external_calendar\models\ExternalCalendar, ['url'])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/db/ActiveRecord.php at line 564 – yii\base\Model::validate(['title', 'url', 'time_zone', 'color', ...])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php at line 645 – yii\db\ActiveRecord::update(true, null)
in /var/www/html/humhub_source/protected/modules/humhub-modules-external-calendar/controllers/CalendarController.php at line 184 – yii\db\BaseActiveRecord::save()
178179180181182183184185186187188189190 if (!$this->canManageCalendar()) {
throw new HttpException(403, Yii::t('ExternalCalendarModule.permissions', 'You are not allowed to manage External Calendar!'));
}
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
$ical = SyncUtils::createICal($model->url);
if ($ical) {
// add info to CalendarModel
$model->addAttributes($ical);
$model->save();
} else {
humhub\modules\external_calendar\controllers\CalendarController::actionUpdate('3')
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([humhub\modules\external_calendar\controllers\CalendarController, 'actionUpdate'], ['3'])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/base/Controller.php at line 156 – yii\base\InlineAction::runWithParams(['r' => 'external_calendar/calendar/updat...', 'id' => '3', 'sguid' => 'ec3314fb-c619-48db-9c0b-48fb0305...', '_pjax' => '#layout-content', ...])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/base/Module.php at line 523 – yii\base\Controller::runAction('update', ['r' => 'external_calendar/calendar/updat...', 'id' => '3', 'sguid' => 'ec3314fb-c619-48db-9c0b-48fb0305...', '_pjax' => '#layout-content', ...])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/web/Application.php at line 102 – yii\base\Module::runAction('external_calendar/calendar/updat...', ['r' => 'external_calendar/calendar/updat...', 'id' => '3', 'sguid' => 'ec3314fb-c619-48db-9c0b-48fb0305...', '_pjax' => '#layout-content', ...])
in /var/www/html/humhub_source/protected/vendor/yiisoft/yii2/base/Application.php at line 380 – yii\web\Application::handleRequest(humhub\components\Request)
in /var/www/html/humhub_source/index.php at line 25 – yii\base\Application::run()
19202122232425 require(DIR . '/protected/humhub/config/web.php'),
(is_readable(DIR . '/protected/config/dynamic.php')) ? require(DIR . '/protected/config/dynamic.php') : [],
require(DIR . '/protected/config/common.php'),
require(DIR . '/protected/config/web.php')
);
(new humhub\components\Application($config))->run();
Yii Framework
2018-03-29, 18:03:19
Apache/2.4.25 (Debian)
Yii Framework/2.0.12
Hidden Gallery
‹ › ×
×
Add image/file
Upload
Close
×
Add link
Title
Title of your link
Target
Enter a url (e.g. http://example.com)
Close Add link
hi
so far, my external links worked - emitted by nextcloud
.. not anymore: error!
i tried to create a new external calendar, but i got an error.
I tried with a previous link, which worked previously, I get also an error.
I went to the logs, and discovered a long long list of errors, like this one:
Thu, 22 Dec 2022 20:10:01 +0100 application yii\base\InvalidValueException: Error while creating ical... Check if link is reachable. in /home/protected/modules/external_calendar/models/ICalSync.php:80 Stack trace: #0 /home/protected/modules/external_calendar/models/ICalSync.php(68): humhub\modules\external_calendar\models\ICalSync->syncICal() #1 /home/protected/modules/external_calendar/models/ExternalCalendar.php(408): humhub\modules\external_calendar\models\ICalSync::sync() #2 /home/protected/modules/external_calendar/jobs/SyncHourly.php(27): humhub\modules\external_calendar\models\ExternalCalendar->sync() #3 /home/protected/humhub/modules/queue/ActiveJob.php(33): humhub\modules\external_calendar\jobs\SyncHourly->run() #4 /home/protected/vendor/yiisoft/yii2-queue/src/Queue.php(246): humhub\modules\queue\ActiveJob->execute() #5 /home/protected/vendor/yiisoft/yii2-queue/src/cli/Queue.php(147): yii\queue\Queue->handleMessage() #6 /home/protected/vendor/yiisoft/yii2-queue/src/drivers/db/Queue.php(83): yii\queue\cli\Queue->handleMessage() #7 [internal function]: yii\queue\db\Queue->yii\queue\db\{closure}() #8 /home/protected/vendor/yiisoft/yii2-queue/src/cli/Queue.php(117): call_user_func() #9 /home/protected/vendor/yiisoft/yii2-queue/src/drivers/db/Queue.php(93): yii\queue\cli\Queue->runWorker() #10 /home/protected/vendor/yiisoft/yii2-queue/src/drivers/db/Command.php(56): yii\queue\db\Queue->run() #11 [internal function]: yii\queue\db\Command->actionRun() #12 /home/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array() #13 /home/protected/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams() #14 /home/protected/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction() #15 /home/protected/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction() #16 /home/protected/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction() #17 /home/protected/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction() #18 /home/protected/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest() #19 /home/protected/yii(29): yii\base\Application->run() #20 {main}
my ical links work in my phone and pc client
I'm using HH 1.12.2
could you help me out with this?
thanks a lot
hello,
really great new module, thanks alot!
but it would be nicer if you can use the official default naming for the repo, with humhub-modules in front, like this:
humhub-modules-external-calendar
as you can see here the official modules:
https://github.com/humhub/humhub-modules-calendar
https://github.com/humhub/humhub-modules-custom-pages
https://github.com/humhub/humhub-modules-mail
it is easier to find in searches and better categorized.
greets
Hi,
could you add the possibility to Participate on the events?
Cheers
Hello,
is there any CalDAV integration planned?
I'd love to see support for integration of nextcloud calendar into HumHub (and vice versa)!
Kind regards
Hi,
I have prepared an italian translation of the files. How to commit? Can't push...
Thanks!
Regards
I added an external calendar but nothing happens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.