Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: hermawan_fsi on November 15, 2017, 04:08:56 AM

Title: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: hermawan_fsi on November 15, 2017, 04:08:56 AM
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...
Title: Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: alec on November 15, 2017, 04:33:34 AM
Either you didn't install Sabre-VObject or it's installed in a wrong version.
Title: Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: mbadici on November 22, 2017, 04:38:18 PM
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.
 
Title: Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: mbadici on February 01, 2020, 10:03:15 AM
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.
 
Title: Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: slault on June 20, 2020, 04:46:09 AM
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.

Code: [Select]
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;
}
});
Title: Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
Post by: tcd on November 30, 2021, 03:11:20 PM
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)

Code: [Select]
apt install php-sabre-*
2. Install composer (if not on your system before)

Code: [Select]
apt install composer
3. Go to your RC directory and run follow command to update some files and install sabre classes.

Code: [Select]
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. :-)