Description
Steps to reproduce
- Create a new tag somewhere outside of the tag root, for instance in content tree
- Leave "Parent tag" field empty
- Publish tag
Result:
On dev: the following exception is thrown:
Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("More than one result was found for query although one row or none was expected."). ... Doctrine\ORM\NonUniqueResultException More than one result was found for query although one row or none was expected. in vendor/ibexa/taxonomy/src/lib/Event/Subscriber/ConfigureMainMenuSubscriber.php->loadTreeRoot (line 65)
On prod it leads to completely meaningless exception:
{"message":"Uncaught Exception: An exception has been thrown during the rendering of a template (\"Rendering a fragment can only be done when handling a Request.\").","context":{"exception":{"class":"Twig\\Error\\RuntimeError","message":"An exception has been thrown during the rendering of a template (\"Rendering a fragment can only be done when handling a Request.\").","code":0,"file":"/app/vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/account/notifications/modal.html.twig:19","previous":{"class":"LogicException","message":"Rendering a fragment can only be done when handling a Request.","code":0,"file":"/app/vendor/symfony/http-kernel/Fragment/FragmentHandler.php:82"}}},"level":500,"level_name":"CRITICAL","channel":"php","datetime":"2022-11-14T15:47:23.635819+00:00","extra":{}}
Note: In the database there will be at least two entries with taxonomy column set to tags and lvl column set to 0.