-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeorgRinger\News\Domain\Model\News::isEvent could not be identified #102
Comments
Got the same error randomly.
Clearing cache let it work just a while Typo3 10.4.6 |
Indeed. Anyone an idea? Really irritating crash bug. |
Same here, TYPO3 10.4.8 After composer dump-autoload I can exactly display the news records for 1 time. After another reload it crashes. |
Hi, Did you make update from TYPO3 8 or 9 to 10? If you load the following typoscript code anymore it could throw this error. This code musst be remove. If this code be loaded, you can easily watch with the typoscript object browser of the template module.
Hope this helps. |
In my case it is a freshly installed TYPO3 10 without old stuff. Currently I fixed it doing a downgrade of EXT:news from 8.4 to 8.3 and I'am not getting this error anymore. |
Also a fresh Typo3 10 without this typoscript snippet @bribbelbum |
Has anyone found a solution yet? I get the same error randomly a while after having cleared the cache. |
I can confirm this issue is still present. For me, it only occurs so far when I clear the cache via TYPO3 Console (cli user). Can anyone help? |
Same here, got that error on two different systems. |
can you test this patch of news which would fix it? https://github.com/georgringer/news/compare/feature/cacherebuilding?expand=1 thx for feedback |
@georgringer I've tested the changes above, but sadly that didn't fix the problem. Same behavior as before (tested on same instance). |
The system cache needs to be cleared at least once before this should work |
@georgringer Yes, I did that. Also multiple times including normal backend cache clear and install-tool cache clear. |
Unfortunately i get also still the exception:
|
Does a workaround exist? Downgrading news to 8.3.0 (suggested by @rasgor) does not help in my case. I use TYPO3 10, news 8.3.0 and eventnews 4.0.0. |
yes use master of ext:news |
Thanks georgringer. Unfortunately it didn't help. I updated news to 8.5.2 from master. I still get the isEvent-Errors (every couple of hours) and this new error: The isEvent error looks like this: |
Might be connected to https://forge.typo3.org/issues/75399 , sometimes the mapping is not available. Maybe just avoid using the model in the code and use QueryBuilder with a viewHelper to fix this problem quickly. Anyways I don't use this extension anymore and made some own code on top of EXT:News |
Current investigation progress (Anatomy of a page request):
Clearing the Cache in the Backend will not remove the DI Container. The next time any EXT:news class will be loaded the News autoloader will be already available and generate the "proxy class". Solution proposal:
|
So here's my proposal for a quick fix: Exclude the models from the DI Container in EXT:news' Services.yaml. GeorgRinger\News\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*' Impact on this issue: Side effects: Well,... probably none. I haven't found any other bugs since but didn't test in depth, but it is bad practice to include Models in the DI Container anyway (I am aware that the TYPO3 documentation does not reflect this). @georgringer Can you please confirm that this change does not break anything? |
Thanks a lot @vertexvaar! |
Domain models should not be scanned during DI Container building, since entities are not meant to be services. The actual bug that results of this missing configuration line is an exception which ocurrs when the extbase ClassSchema is built in the same request as the DI Container scanned all classes. The issue this PR targets is georgringer/eventnews#102
Domain models should not be scanned during DI Container building, since entities are not meant to be services. The actual bug that results of this missing configuration line is an exception which ocurrs when the extbase ClassSchema is built in the same request as the DI Container scanned all classes. The issue this PR targets is georgringer/eventnews#102
The type of property GeorgRinger\News\Domain\Model\News::isEvent could not be identified, as property isEvent is unknown to the TYPO3\CMS\Extbase\Reflection\ClassSchema instance of class GeorgRinger\News\Domain\Model\News. Please make sure said property exists and that you cleared all caches to trigger a new build of said TYPO3\CMS\Extbase\Reflection\ClassSchema instance.
This error occurs every couple of page loads..
TYPO3 10.4.6
News 8.3.0
Eventnews 4.0.0
The text was updated successfully, but these errors were encountered: