You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up an EventListerner for the NewsListActionEvent and do a call on a extended model field in there. This results in the following error after clearing the cache via TYPO3 Backend: Call to undefined method GeorgRinger\News\Domain\Model\NewsInternal::getCsNewsExtendedBrands(). After loading the page a second time the error is gone but the method getCsNewsExtendedBrands returns null instead of an ObjectStorage.
When using typo3 cache:flush on CLI or clearing caches via the Install-Tool, the error is gone and everything works like expected. But as soon as I clear the general caches via TYPO3 backend, it will error again like described above.
Expected behavior/output
Extending the base model and do a call on added method in NewsListActionEventListener should execute the method after clearing caches via TYPO3 Backend
Environment
TYPO3 version(s): 12.4
news version: 11.4.2
Is your TYPO3 installation set up with Composer (Composer Mode): yes
OS: Linux Ubuntu
Possible Solution
use typo3 cache:flush on CLI or clear caches via Install-Tool but do not flush caches via backend.
Additional context
I could upload my extended_news extension or the stacktrace if it helps tracking this issue down.
The text was updated successfully, but these errors were encountered:
akoenig-clickstorm
changed the title
Call to undefined method with extended news model and NewsListEventListener
Call to undefined method with extended news model and NewsListActionEventListener
Aug 1, 2024
Bug Report
Current Behavior
There seems to be an issue within the ProxyClassGenerator, I have extended the base news model like described here: https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/ExtendNews/ProxyClassGenerator/Index.html
Set up an EventListerner for the NewsListActionEvent and do a call on a extended model field in there. This results in the following error after clearing the cache via TYPO3 Backend:
Call to undefined method GeorgRinger\News\Domain\Model\NewsInternal::getCsNewsExtendedBrands()
. After loading the page a second time the error is gone but the method getCsNewsExtendedBrands returns null instead of an ObjectStorage.When using
typo3 cache:flush
on CLI or clearing caches via the Install-Tool, the error is gone and everything works like expected. But as soon as I clear the general caches via TYPO3 backend, it will error again like described above.Expected behavior/output
Extending the base model and do a call on added method in NewsListActionEventListener should execute the method after clearing caches via TYPO3 Backend
Environment
Possible Solution
use
typo3 cache:flush
on CLI or clear caches via Install-Tool but do not flush caches via backend.Additional context
I could upload my extended_news extension or the stacktrace if it helps tracking this issue down.
The text was updated successfully, but these errors were encountered: