Author Topic: PHP Fatal error: Class 'Sabre\VObject\Property\Text'  (Read 4087 times)

Offline hermawan_fsi

  • Newbie
  • *
  • Posts: 5
PHP Fatal error: Class 'Sabre\VObject\Property\Text'
« 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...

Offline alec

  • Hero Member
  • *****
  • Posts: 1,200
Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
« Reply #1 on: November 15, 2017, 04:33:34 AM »
Either you didn't install Sabre-VObject or it's installed in a wrong version.

Offline mbadici

  • Newbie
  • *
  • Posts: 2
Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
« Reply #2 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.
 

Offline mbadici

  • Newbie
  • *
  • Posts: 2
Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
« Reply #3 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.
 

Offline slault

  • Newbie
  • *
  • Posts: 1
Re: PHP Fatal error: Class 'Sabre\VObject\Property\Text'
« Reply #4 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;
}
});