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
UnexpectedValueException: tree metadata #457
Comments
Are you using the extension in a mapped superclass ? If yes, this is likely the same issue than #455 (for a different extension but the bug in gedmo/doctrine-extensions affects all extensions) |
@alexander-schranz |
@stof Yes it are mapped-superclass and usage of the Do you have an example of the cache configuraiton you mention in: #455 (comment) Could not find something in the recipe: https://github.com/symfony/recipes-contrib/blob/main/stof/doctrine-extensions-bundle/1.2/config/packages/stof_doctrine_extensions.yaml |
@alexander-schranz as for any other bundle, you can use |
@stof What confuses me more is what value to use, as there is in the doctrine recipe not longer a doctrine metadata cache pool, which I first thought I could just configure that in stof extension. But that was as I thought removed some time ago and only result and system cache for query cache exists now: https://github.com/symfony/recipes/blob/main/doctrine/doctrine-bundle/2.10/config/packages/doctrine.yaml I debugged now how doctrine is handling it in the bundle it seems like they go on Seems like its not a cache pool used by doctrine itself for the metadata, atleast it doesn't looke for me like a PSR6 cache pool? Would it make sense that the stof extension bundle handles the things the same that on For current state the system cache pool seems atleast not run into that issue but only should configured in when@prod:
stof_doctrine_extensions:
# fix issue with gedmo/extensions 1.8.0 and stof/doctrine-extensions-bundle: 3.12.0
# @see https://github.com/stof/StofDoctrineExtensionsBundle/issues/457
metadata_cache_pool: doctrine.system_cache_pool For Sulu users: when@prod: &prod
stof_doctrine_extensions:
# fix issue with gedmo/extensions 1.8.0 and stof/doctrine-extensions-bundle: 3.12.0
# @see https://github.com/stof/StofDoctrineExtensionsBundle/issues/457
metadata_cache_pool: doctrine.system_cache_pool
when@stage: *prod |
Update: Okay the new error was unrelated to this issue. The old class was still in the SessionStorage of Symfony after cleering the session it did work in my case. |
Can confirm this issue |
After upgrading to v1.8.0 I'll get this error – ONLY in production
APP_ENV=prod
:[2023-07-12T17:14:15.082831+02:00] request.CRITICAL: Uncaught PHP Exception Gedmo\Exception\UnexpectedValueException: "Tree object class: App\Entity\Account must have tree metadata at this point" at /var/www/html/vendor/gedmo/doctrine-extensions/src/Tree/TreeListener.php line 116 {"exception":"[object] (Gedmo\Exception\UnexpectedValueException(code: 0): Tree object class: App\Entity\Account must have tree metadata at this point at /var/www/html/vendor/gedmo/doctrine-extensions/src/Tree/TreeListener.php:116)"} []
All is working fine when using v1.7.2 in combination with gedmo extension 3.12.0.
The text was updated successfully, but these errors were encountered: