Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate birthday calendar #205

Open
Spheerys opened this issue Nov 24, 2015 · 11 comments
Open

Duplicate birthday calendar #205

Spheerys opened this issue Nov 24, 2015 · 11 comments

Comments

@Spheerys
Copy link

Spheerys commented Nov 24, 2015

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 !

calendarplus

From which component the issue comes from ?
How can I delete them on one time ?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28563971-duplicate-birthday-calendar?utm_campaign=plugin&utm_content=tracker%2F19394737&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F19394737&utm_medium=issues&utm_source=github).
@Webbeh
Copy link

Webbeh commented Nov 28, 2015

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.

@Webbeh
Copy link

Webbeh commented Nov 28, 2015

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_ isn't saved correctly...

(I have ContactsPlus installed)

@Spheerys
Copy link
Author

Spheerys commented Dec 2, 2015

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 ?

@JBScoutBerlin
Copy link

@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 ;)

@Webbeh
Copy link

Webbeh commented Dec 2, 2015

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.

@Webbeh
Copy link

Webbeh commented Dec 2, 2015

Deleting them in the database, if they are all empty, leaves no side effect other than described in the previous message.

@Spheerys
Copy link
Author

Spheerys commented Dec 5, 2015

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) :)

@Spheerys Spheerys closed this as completed Dec 5, 2015
@Webbeh
Copy link

Webbeh commented Dec 5, 2015

Since the bug is not resolved, you should not close it.

@Spheerys Spheerys reopened this Dec 18, 2015
@Spheerys
Copy link
Author

You're right, I have reopen it :)

@sggalan
Copy link

sggalan commented Mar 23, 2016

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.

@Zettt
Copy link

Zettt commented Apr 6, 2016

I too have this problem, with an uppercase username in OC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants