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

Parent of category can not be accessed #302

Open
2 of 4 tasks
mueller-sebastian opened this issue Jan 25, 2024 · 0 comments · May be fixed by #303
Open
2 of 4 tasks

Parent of category can not be accessed #302

mueller-sebastian opened this issue Jan 25, 2024 · 0 comments · May be fixed by #303

Comments

@mueller-sebastian
Copy link

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v9.5 LTS
  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 v11.x
  • Did you perform a cursory search to see if your bug or feature is already reported?

Description

When trying to access the parent of one single category of an post, an error occures. Category has ORM/lazy, the Category->getParent() function tries to return an lazy loading proxy object but the allowed return types are null and Category.

Steps to Reproduce

Try to access the parent of an category assigned to a blog post

        <f:for each="{post.categories}" as="category" iteration="iterator">
            {category.parent.title}
        </f:for>

Expected behavior: [What you expected to happen]
Throw no error and return parent category values

Actual behavior: [What actually happened]

(1/1) TypeError
Return value of T3G\AgencyPack\Blog\Domain\Model\Category::getParent() must be an instance of T3G\AgencyPack\Blog\Domain\Model\Category or null, instance of TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy returned

Versions

t3g/blog 12.0.2

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

Successfully merging a pull request may close this issue.

1 participant