Attempted to load class "String" from the global namespace. Did you forget a "use" st
Hallo,
ich habe versucht, das Modul zad_sendnews um einen automatischen Teaser zu erweitern. Dabei habe ich folgende Zeilen gefunden (https://community.contao.org/en/show...-news-by-email):
PHP-Code:
// add default auto-teaser at first full stop or 80 chars
$this->import('String');
$pos = max(300, (strpos($this->text, '.')+1));
$this->news['teaser'] = $this->String->substr($this->text, $pos, ($pos == 300));
Ansich funktioniert die Erweiterung absolut problemlos unter Contao 4.5, nur bei dieser Modifikation tritt ein Fehler auf:
Code:
Attempted to load class "String" from the global namespace. Did you forget a "use" statement for "PHPExcel_Shared_String"?
bzw.
Code:
[2018-02-09 23:06:02] app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\Component\Debug\Exception\ClassNotFoundException(code: 0): Attempted to load class "String" from the global namespace.\nDid you forget a "use" statement for "PHPExcel_Shared_String"? at /var/www/vhosts/hosting104991.af9be.netcup.net/httpdocs/contao4/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:175)"} []
Ich habe dabei schon gefunden, dass das Problem angeblich gelöst ist (https://github.com/contao/standard-edition/issues/64), ist es aber nicht. Sendnews verwendet auch eine .htaccess. Wie könnte man den Fehler beheben?
Gruß