psi-4ward / news4ward

Contao Extensions: News/Blog based on contentelements
13 stars 12 forks source link

Fehler nach Umstellung auf PHP 7 #94

Closed harley-rider closed 7 years ago

harley-rider commented 7 years ago

Nach Update auf contao 3.5.24 und news4ward 2.3.0 haben die Newsseiten problemlos funktioniert. Nach Serverupdate von PHP 5.6.30 auf PHP 7.0.16 blebt die Seite leer und im Errorlog finde ich folgende Fehlermeldung : [20-Mar-2017 17:48:59 Europe/Zurich] PHP Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/vhosts/harley-rider.ch/httpdocs/harley-rider/contao-3-5-24/system/modules/core/library/Contao/String.php on line 28

psi-4ward commented 7 years ago

News4ward 2.3 funzt eig mit PHP 7. Hast du nen Stacktrace dazu?

harley-rider commented 7 years ago

Wenn ich wüsste wie diesen Stacktrace zu erzeugen, könnte ich ihn sicher liefern ...

harley-rider commented 7 years ago

Fatal error: Uncaught exception ParseError with message syntax error, unexpected 'debug_print_backtrace' (T_STRING), expecting function (T_FUNCTION) thrown in system/modules/core/library/Contao/String.php on line 70

0 [internal function]: Contao\ClassLoader::load('String')

1 [internal function]: spl_autoload_call('String')

2 system/modules/core/library/Contao/System.php(140): get_class_methods('\String')

3 system/modules/news4ward/Module/Module.php(76): Contao\System->import('\String')

4 system/modules/news4ward/Module/Listing.php(195): Psi\News4ward\Module\Module->parseArticles(Array)

5 system/modules/core/modules/Module.php(287): Psi\News4ward\Module\Listing->compile()

6 system/modules/news4ward/Module/Listing.php(52): Contao\Module->generate()

7 system/modules/core/elements/ContentModule.php(59): Psi\News4ward\Module\Listing->generate()

8 system/modules/core/library/Contao/Controller.php(484): Contao\ContentModule->generate()

9 system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')

10 system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()

11 system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()

12 system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)

13 system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')

14 system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')

15 system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)

16 index.php(20): Contao\FrontendIndex->run()

17 {main}

psi-4ward commented 7 years ago

Sicher das du die aktuelle Version hast? https://github.com/psi-4ward/news4ward/blob/master/Module/Module.php#L76

On 21.03.2017 13:49, harley-rider wrote:

Fatal error: Uncaught exception ParseError with message syntax error, unexpected 'debug_print_backtrace' (T_STRING), expecting function (T_FUNCTION) thrown in system/modules/core/library/Contao/String.php on line 70

0 [internal function]: Contao\ClassLoader::load('String')

1 https://github.com/psi-4ward/news4ward/issues/1 [internal

function]: spl_autoload_call('String')

2 https://github.com/psi-4ward/news4ward/issues/2

system/modules/core/library/Contao/System.php(140): get_class_methods('\String')

3 https://github.com/psi-4ward/news4ward/issues/3

system/modules/news4ward/Module/Module.php(76): Contao\System->import('\String')

4 https://github.com/psi-4ward/news4ward/issues/4

system/modules/news4ward/Module/Listing.php(195): Psi\News4ward\Module\Module->parseArticles(Array)

5 https://github.com/psi-4ward/news4ward/issues/5

system/modules/core/modules/Module.php(287): Psi\News4ward\Module\Listing->compile()

6 https://github.com/psi-4ward/news4ward/issues/6

system/modules/news4ward/Module/Listing.php(52): Contao\Module->generate()

7 https://github.com/psi-4ward/news4ward/issues/7

system/modules/core/elements/ContentModule.php(59): Psi\News4ward\Module\Listing->generate()

8 https://github.com/psi-4ward/news4ward/issues/8

system/modules/core/library/Contao/Controller.php(484): Contao\ContentModule->generate()

9 https://github.com/psi-4ward/news4ward/issues/9

system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')

10 https://github.com/psi-4ward/news4ward/issues/10

system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()

11 https://github.com/psi-4ward/news4ward/issues/11

system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()

12 https://github.com/psi-4ward/news4ward/issues/12

system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)

13 https://github.com/psi-4ward/news4ward/issues/13

system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')

14 https://github.com/psi-4ward/news4ward/issues/14

system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')

15 https://github.com/psi-4ward/news4ward/issues/15

system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)

16 https://github.com/psi-4ward/news4ward/issues/16 index.php(20):

Contao\FrontendIndex->run()

17 https://github.com/psi-4ward/news4ward/issues/17 {main}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psi-4ward/news4ward/issues/94#issuecomment-288068083, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIulBKCM6HmvL6Am5ufpMqclC3vJ9BRks5rn8dGgaJpZM4MjuLU.

harley-rider commented 7 years ago

Zeilen 75 - 77 aus /httpdocs/harley-rider/contao-3-5-24/system/modules/news4ward/Module/Module.php

    global $objPage;
    $this->import('\String');
    $this->import('\News4ward\Helper','Helper');

sieht nicht ganz gleich aus ... String vs. StringUtil Update habe ich über die Paketverwaltung gemacht.

psi-4ward commented 7 years ago

tatsache, da fehlt n release. 2.3.1 getagged

On 21.03.2017 14:03, harley-rider wrote:

Zeilen 75 - 77 aus /httpdocs/harley-rider/contao-3-5-24/system/modules/news4ward/Module/Module.php

|global $objPage; $this->import('\String'); $this->import('\News4ward\Helper','Helper'); |

sieht nicht ganz gleich aus ... String vs. StringUtil Update habe ich über die Paketverwaltung gemacht.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psi-4ward/news4ward/issues/94#issuecomment-288071340, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIulAlifLxgR4JcD9DzZTD9kR6V2kyoks5rn8qIgaJpZM4MjuLU.

harley-rider commented 7 years ago

Danke schon mal, Verifikation dauert länger, da ich auf dem Server wegen Memory Problemen nicht updaten kann. Muss die Installation Lokal updaten.

harley-rider commented 7 years ago

Update auf 2.3.1 ist erfolgt, nun erhalte ich den nächsten Fehler :

Fatal error: Uncaught exception Error with message Function name must be a string thrown in system/modules/news4ward/Module/Module.php on line 193

0 system/modules/news4ward/Module/Listing.php(195): Psi\News4ward\Module\Module->parseArticles(Array)

1 system/modules/core/modules/Module.php(287): Psi\News4ward\Module\Listing->compile()

2 system/modules/news4ward/Module/Listing.php(52): Contao\Module->generate()

3 system/modules/core/elements/ContentModule.php(59): Psi\News4ward\Module\Listing->generate()

4 system/modules/core/library/Contao/Controller.php(484): Contao\ContentModule->generate()

5 system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')

6 system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()

7 system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()

8 system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)

9 system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')

10 system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')

11 system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)

12 index.php(20): Contao\FrontendIndex->run()

13 {main}

harley-rider commented 7 years ago

Erste Korrektur mit dem Update eines neuen Releases ging ja flott, aber nun ... Geht da noch was oder muss ich mich nach einer andern Lösung umsehen ?

psi-4ward commented 7 years ago

https://github.com/psi-4ward/news4ward/blob/master/Module/Module.php#L76

harley-rider commented 7 years ago

Ich habe das installierte Module.php mit dem oben verlinkten abgeglichen. Es ist identisch - Es ist ja auch nicht derselbe Fehler, der zu Beginn auftrat und mit der genannten Korrektur behoben wurde, sondern ein neuer ...