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

Trashed content crashed admin tag view #154

Closed iherak closed 1 year ago

iherak commented 1 year ago

If content that is related to the tag is moved to trash, it is not possible to view the tag in admin - related content is returned without main location so it fails with Cannot generate an UrlAlias route for content without main location.

emodric commented 1 year ago

@iherak Fixed in 3.4.12

Please test and report back :)

iherak commented 1 year ago

Tested and confirmed it works now! Thank you @emodric!

iherak commented 1 year ago

Hm, seems this does not fix it completely, it still crashes on related_content (showing all related content of the tag).

emodric commented 1 year ago

This might not be easily fixed, I'm afraid. Fetching related content is done by using TagsService::getRelatedContent, which internally uses eZ search service which, it seems, does not support filtering out content without main location.

The issue lies in paging, that is, fetching the count of content items. While it is possible to filter out content without the main locations after the fetch, by doing that, the count and paging will go out of sync.

I have no good solution for this currently, so I'm accepting ideas :)

iherak commented 1 year ago

Maybe we could take care of this at template level - do not generate a link if the content does not have main location id set? We just show content information without the link?

emodric commented 1 year ago

Sounds good 👍

emodric commented 1 year ago

Fixed in 3.4.13