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

[9.5.3] Unable to sync planning with Thunderbird or Evolution #8376

Closed
fulljackz opened this issue Dec 3, 2020 · 6 comments
Closed

[9.5.3] Unable to sync planning with Thunderbird or Evolution #8376

fulljackz opened this issue Dec 3, 2020 · 6 comments

Comments

@fulljackz
Copy link

fulljackz commented Dec 3, 2020

Describe the bug

Can't synchronize glpi planning with any caldav client such as Thunderbird, gnome calendar

A clear and concise description of what the bug is.

Page(s) URL

http://localhost/glpi/front/planning.php

To reproduce

Steps to reproduce the behavior:

  1. Go to http://localhost/glpi/front/planning.php
  2. Click on your planning and select "Copy caldav url"
  3. Open Thunderbird and add a network calendar, paste url, add username and ok.
  4. Thunderbird try to sync and turn calendar in grey without error.
  5. See error in /var/www/glpi/files/_log/php-errors.log

Expected behavior

Calendar bi directionnal sync such as Nextcloud does.

Logs

  • When trying from Gnome agenda with short URL (trying auto discover ? glpi/files/_log/php-errors.log whe
[2020-12-03 14:10:42] glpiphplog.ERROR: Glpi\CalDAV\Server::logException() in /var/www/html/glpi/inc/caldav/server.class.php line 97
Sabre\DAV\Exception\NotImplemented: There was no plugin in the system that was willing to handle this GET method. Enable the Browser plugin to get a better result here.
#0 /var/www/html/glpi/vendor/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#1 /var/www/html/glpi/caldav.php(47): Sabre\DAV\Server->start()
#2 {main}  {"user":"74@glpi"} 
  • When trying from Thunderbird with full url + username nginx/access.log
A.B.C.D - - [03/Dec/2020:14:58:30 +0100] "PROPFIND /glpi/caldav.php/calendars/users/bob/calendar/ HTTP/1.1" 404 143 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0"

GLPI setup

Operating system: Linux glpi 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
PHP 7.2.34-8+0~20201103.52+debian9~1.gbpafa084 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apc, apcu,
	bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap,
	libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, sodium, standard,
	sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
	upload_max_filesize="2M" 
Software: nginx/1.10.3
	Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Server Software: Debian 9.13
	Server Version: 10.1.47-MariaDB-0+deb9u1
	Server SQL Mode: 
	Parameters: glpi@localhost/glpi
	Host info: Localhost via UNIX socket

Regards,

@fulljackz fulljackz changed the title Unable to sync planning with Thunderbird or Evolution [9.5.3] Unable to sync planning with Thunderbird or Evolution Dec 3, 2020
@tsmr
Copy link
Collaborator

tsmr commented Dec 18, 2020

Due to DEBUG_MODE condition : into /glpi/inc/caldav/plugin/browser.class.php

diff --git a/inc/caldav/plugin/browser.class.php b/inc/caldav/plugin/browser.class.php
index a3a2e7657a..39077960a3 100644
--- a/inc/caldav/plugin/browser.class.php
+++ b/inc/caldav/plugin/browser.class.php
@@ -72,6 +72,6 @@ class Browser extends Plugin {
 
       $user = $this->getPrincipalItemFromUri($authPlugin->getCurrentPrincipal());
 
-      return $user instanceof \User && \Session::DEBUG_MODE == $user->fields['use_mode'];
+      return $user instanceof \User; // && \Session::DEBUG_MODE == $user->fields['use_mode']
    }
 }

@fulljackz
Copy link
Author

Hi,

I tried to apply your diff on browser.class.php, no result.

I always have

192.168.0.1 - - [18/Dec/2020:09:17:23 +0100] "PROPFIND /glpi/caldav.php/calendars/users/bob/calendar/ HTTP/1.1" 404 143 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0"

Do you have another hint to find out the problem ?

Regards,

@CorentinS6
Copy link

Hello,

I have a similar problem with my glpi instance, which using a CAS auth.

My error is :
IP - username [26/Feb/2021:14:45:49 +0100] "PROPFIND /caldav.php/calendars/users/csirou/calendar/ HTTP/1.1" **302** 363 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Lightning/68.9.0"

Regards

@felag
Copy link

felag commented Apr 15, 2021

Due to DEBUG_MODE condition : into /glpi/inc/caldav/plugin/browser.class.php

diff --git a/inc/caldav/plugin/browser.class.php b/inc/caldav/plugin/browser.class.php
index a3a2e7657a..39077960a3 100644
--- a/inc/caldav/plugin/browser.class.php
+++ b/inc/caldav/plugin/browser.class.php
@@ -72,6 +72,6 @@ class Browser extends Plugin {
 
       $user = $this->getPrincipalItemFromUri($authPlugin->getCurrentPrincipal());
 
-      return $user instanceof \User && \Session::DEBUG_MODE == $user->fields['use_mode'];
+      return $user instanceof \User; // && \Session::DEBUG_MODE == $user->fields['use_mode']
    }
 }

Applying this patch on GLPi 9.5.4 resolved same issue here. Thanks.

Edit: sorry, I commented too fast !

It resolved accessing URL from Firefox browser , but not for Thunderbird !?!
Edit2: it is resolved with Thunderbird too !

@fulljackz
Copy link
Author

Due to DEBUG_MODE condition : into /glpi/inc/caldav/plugin/browser.class.php

diff --git a/inc/caldav/plugin/browser.class.php b/inc/caldav/plugin/browser.class.php
index a3a2e7657a..39077960a3 100644
--- a/inc/caldav/plugin/browser.class.php
+++ b/inc/caldav/plugin/browser.class.php
@@ -72,6 +72,6 @@ class Browser extends Plugin {
 
       $user = $this->getPrincipalItemFromUri($authPlugin->getCurrentPrincipal());
 
-      return $user instanceof \User && \Session::DEBUG_MODE == $user->fields['use_mode'];
+      return $user instanceof \User; // && \Session::DEBUG_MODE == $user->fields['use_mode']
    }
 }

Applying this patch on GLPi 9.5.4 resolved same issue here. Thanks.

Edit: sorry, I commented too fast !

It resolved accessing URL from Firefox browser , but not for Thunderbird !?!
Edit2: it is resolved with Thunderbird too !

Still not from my side.
Are you using glpi with nginx ? I still have a 404 not found even from firefox or thunderbird.
Regards,

@fulljackz
Copy link
Author

fulljackz commented Apr 19, 2021

Just switched from nginx to apache2 and magically, it's working.
I think about a rewrite rule not applied by nginx, or something else related to the web server.

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