netgen / TagsBundle

Netgen Tags Bundle is an eZ Platform bundle for taxonomy management and easier classification of content, providing more functionality for tagging content than ezkeyword field type included in eZ Platform kernel.
https://netgen.io
GNU General Public License v2.0
48 stars 43 forks source link

Tag route generation in template fails on eZ Platform v3.0.0-beta6+ #119

Closed janit closed 4 years ago

janit commented 4 years ago

Symfony 5 used from eZ Platform v3.0.0-beta6 onwards fails to work with the field template:

{{ path(tag) }}

This results in an error, e.g.

Argument 1 passed to Symfony\Bridge\Twig\Extension\RoutingExtension::getPath() must be of the type string, object given, called in /Users/janit/Sites/web2020/var/cache/dev/twig/b4/b482342675f57a04e47c2fbe032a70357ab4e6e38bcaa459171a5ab772a9dc0d.php on line 71

Similar issue is also with the core eZ Platform routing, when using location objects, for example: {{ path(locationObject) }}, discussion on topic here: https://github.com/ezsystems/ezpublish-kernel/pull/3000

emodric commented 4 years ago

Thanks @janit !

I am basically waiting for https://github.com/ezsystems/ezpublish-kernel/pull/3000 to be merged to test if using those functions works. If not, I'll implement a solution. If so, it will take some time probably, since I have other pressing priorities currently on client projects.

janit commented 4 years ago

Good to hear you are ok @emodric despite the earthquake in Zagreb.

I created a PR which explicitly uses the route param. The syntax in that one is a functional workaround for me in an overridden template. It is here: https://github.com/netgen/TagsBundle/pull/120

emodric commented 4 years ago

Thanks! Yes, Netgen is safe :) Only cosmetic damage to the office!

If you could test if ez_path from eZ PR also works, that would be awesome!