calendarplus
calendarplus copied to clipboard
Duplicate birthday calendar
Hi,
I have a duplicate suscribed birthday calendar but I'm not sure if the problem comes from calendarplus, Thunderbird SoGo Connector or SolCalendar (my android app) !
I have all day more and more birthday suscribed calendar, and I don't know why !

From which component the issue comes from ? How can I delete them on one time ?
Have the same issue.
Since I don't have any of those apps listed, it's safe to assume it comes from Calendar+.
One more "birthdays" subscription is added every time I access/refresh the page.
Uncommenting those lines :
if(\OC::$server->getAppManager()->isEnabledForUser('contactsplus')) {
$appinfo =\OCP\App::getAppVersion('contactsplus');
if (version_compare($appinfo, '1.0.6', '>=')) {
$calId = $this->calendarController->checkBirthdayCalendarByUri('bdaycpltocal_'.$this->userId);
}
}
in pagecontroller.php prevented the Birthdays from duplicating.
I guess, by looking at checkBirthdayCalendarByUri, that $this->userId may not always return the same thing ? Or that bdaycpltocal_<userId> isn't saved correctly...
(I have ContactsPlus installed)
These lines are not commented in my pagecontroller.php file. Maybe I should comment them ?
And after fix the problem, how did you remove the duplicate birthday calendars ? One by one or with a SQL query ?
@Spheerys: I would recommend to remove them one by one via OC webclient to be sure that there are no side effects if you delete them directly an the DB-level.
Yea, I know, you've got a lot of entries - but just to be sure ;)
I commented out the lines myself.
After the fix, I deleted all but one of the birthdays.
Be aware that after commenting the text out, if you delete every subscription you have, it won't reappear. So either delete all but one of the birthdays (by hand/with sql), or delet everything, uncomment the lines, regenerate one, recomment the lines.
I deleted by hand, only had a few ones.
Deleting them in the database, if they are all empty, leaves no side effect other than described in the previous message.
I finally delete them manually ^^
Inside the pagecontroller.php file, I just comment one line this way :
if(\OC::$server->getAppManager()->isEnabledForUser('contactsplus')) {
$appinfo =\OCP\App::getAppVersion('contactsplus');
if (version_compare($appinfo, '1.0.6', '>=')) {
#$calId = $this->calendarController->checkBirthdayCalendarByUri('bdaycpltocal_'.$this->userId);
}
}
My problem is solved (until next upgrade) :)
Since the bug is not resolved, you should not close it.
You're right, I have reopen it :)
Hello. The problem is related to upper case characters in usernames.
There's some place where code makes strtolower when creating the URI for the calendar link.
The app checks for the existence of birthday's calendar by comparing the actual UserName with the calendar's URI bdaycpltocal_'.$aCalendar['userid'] but unfortunately $aCalendar['userid'] is always lower case.
So they will never match if you use any upper case character in your usernames and then a new calendar will be created every time you get into the app.
A pity I'm not able to fix it. Just looking for strtolower strings but no success for now even commenting all appearings out. :-/ I'll write if I get any new hint.
Up to now I've disabled the creation of the birthday calendar at public function checkBirthdayCalendarByUri($uri) in calendarcontroller.php.
(Meanwhile, I keep struggling with another issue)
Regards.
I too have this problem, with an uppercase username in OC.