Roundcube Community Forum

 

PHP Fatal error: Class 'Sabre\VObject\Property\Text'

Started by hermawan_fsi, November 15, 2017, 04:08:56 AM

Previous topic - Next topic

hermawan_fsi

i have just install calender plugins in
and in  my log file i have error
roundcube: PHP Fatal error:  Class 'Sabre\VObject\Property\Text' not found in /opt/www/roundcubemail-1.3.0/plugins/libcalendaring/libvcalendar.php on line 1422

try to asking mr. google and got somec clues..
http://lists.kolab.org/pipermail/users/2016-June/020790.html
still can not figure it why...

alec

Either you didn't install Sabre-VObject or it's installed in a wrong version.

mbadici

I just added ( after a lot of trials) :
include "/usr/share/roundcubemail/plugins/libcalendaring/vendor/sabre/vobject/lib/Property/Text.php";
in libvcalendar.php  .
I should learn someday how composer works but this time it certainly failed.

mbadici

I just configured  a fresh install on buster.
The problem is still there. What I found is the class Text ( in file Text.php) is missing in  php-sabre-vobject package.
I just copied the definition from /vendor/sabre/vobject/lib/Property/Text.php   to /vendor/sabre/vobject/lib/Property/Text.php and the problem dissapeared.
I don't know if the class should be present in the main package or should be load from the composer installed package.

slault

Solution for shared hosting users

add this to plugins\libcalendaring\libvcalendar.php Dont forget to replace xxxxx with yours paths or correct to yours. If having problem uncomment echo and check for path errors.

spl_autoload_register(function ($class) {
if (strpos($class, 'Sabre\\')===0) {
$classs = str_replace('\\', '/', $class);
$classs = str_replace('Sabre/VObject/', 'vobject/lib/', $classs);
$classs = str_replace('Sabre/Xml/', 'xml/lib/', $classs);
$file = '/home/xxxxx/domains/xxxxx/public_html/plugins/libcalendaring/vendor/sabre/'.$classs.'.php';
include $file;
//echo $file;
}
});

tcd

Sorry, when I open this grave :)

I had the same Problem after update RC to 1.5.1 and switch to PHP 8.0 (For my Nextcloud-installation). Only with deactivated Calender let me read my mails. But I found a other solution on Debian Bullseye.

1. Install sabre php files (I don“t know is this step really necessary)

apt install php-sabre-*

2. Install composer (if not on your system before)

apt install composer

3. Go to your RC directory and run follow command to update some files and install sabre classes.

sudo -u www-data composer update ; sudo -u www-data composer require sabre/dav ~3.1.3

Now, RC should run with the calender normaly. :-)