Skip to content
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

Extended model broken if content elements are disabled #2537

Open
ghermens opened this issue Oct 23, 2024 · 1 comment
Open

Extended model broken if content elements are disabled #2537

ghermens opened this issue Oct 23, 2024 · 1 comment

Comments

@ghermens
Copy link
Contributor

After adding cusom fields to the news model and disabeling records.contentElementRelation in the extension configuration, the generated model in ~/var/cache/code/news/tx_news_domain_model_news.php does not provide a getter for $contentElements.
This causes an error in detail view:

#1546632293 RuntimeException
Could not get value of property "GeorgRinger\News\Domain\Model\NewsDefault::contentElements", make sure the property is either public or has a getter getContentElements(), a hasser hasContentElements() or an isser isContentElements().
in /var/www/sn-maschinenbau-2024/vendor/typo3/cms-extbase/Classes/Validation/Validator/AbstractGenericObjectValidator.php line 69

After reenabeling records.contentElementRelation and clearing Caches, everything works as expected.

Environment

  • TYPO3 version: 12.4.22
  • news version: 12.0.0
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes
  • OS: Debian
@seirerman
Copy link

Can confirm after updating to TYPO3 12 and news 12. We've never used content elements in news records, but the error was gone after setting records.contentElementRelation=1. Unlike @ghermens we don't use custom news fields for that website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants