fnagel / t3extblog

A record based blog extension for TYPO3 CMS. Easy to use and packed with features (incl. comments, subscriptions for comments and posts, Wordpress like subscription manager, reasonable email sending in FE and BE, GDPR ready, BE modules, Dashboard widgets, RSS, Sitemap, ...). Flexible and powerful!
http://typo3.org/extensions/repository/view/t3extblog
GNU General Public License v2.0
32 stars 18 forks source link

Unable to call FelixNagel\T3extblog\Service\FlushCacheService::flushFrontendCache() #264

Closed stanglf closed 9 months ago

stanglf commented 9 months ago

Since the Upgrade from V10 to V11, I get this warning in my TYPO3 (11.5.30) Backend protocol after writing a comment:

Core: Error handler (FE): PHP Warning: (Registered shutdown functions) Unable to call FelixNagel\T3extblog\Service\FlushCacheService::flushFrontendCache() - function does not exist in Unknown line 0

Any ideas how to fix that?

I tried to debug the Comment Controller and the belonging functions and services but couldn't find a solution. I use version 7.0 of this extension.

Thanks in advance!

fnagel commented 9 months ago

First, can you post the complete stack trace? Would be helpful to get more insights to your issue.

The related function flushFrontendCache is needed due to a core bug documented in #112. The general functionality of this hasn't been changed for quite some time and should work as expected, so I'm a little confused how this error is caused. Could be some kind of autoloading / DI issue with composer. The function itself is existing in your code, right?

Is there any specific reason why you are using v7.0.0 instead of v.7.1.0? Did you try using the master branch?

Another thing I noticed when checking the code history is this change: https://github.com/fnagel/t3extblog/commit/c4dd85e1fabc4a88ad1d9ba0f0a6e0da87a7d955#diff-ee98a8572ea4815d9f08bf651752e3c549bc75d8dd748c9b8ddeefafe980dd6aR36 Would you mind trying to change this back to public and see if the error still occurs? It works in my tests with protected but you never know ;-)

stanglf commented 9 months ago

Yes, we also tried using v.7.1.0, but that didn't help.

But changing the flushFrontendCache() function to public works for us!

Thanks!

fnagel commented 9 months ago

I was not able to reproduce this but it might be an issue only on specific PHP versions and (error) configuration.

I will push a fix and it will be included in the upcoming release. Thanks for testing and giving feedback!