Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
4.5.6, 4.6.2
-
None
-
None
-
Yes
Description
Steps to reproduce
- Install ibexa DXP
- Create a content type with relation list field
- Create a content using created CT and add 2-3 contents to relation
- Create view match
ibexa: system: default: content_view: full: test: template: "@ibexadesign/full/test.html.twig" match: Id\Location: 70
- Create a file under /templates/themes/standard/full/test.html.twig
{% extends '@ibexadesign/pagelayout.html.twig' %} {% block content %} {% set contents = ibexa_field_value(content, 'field_660684ef4a486').destinationContentIds %} {% for c in contents %} {% set routeReference = ibexa_route("ibexa.url.alias", {'contentId': c }) %} <a href="{{ ibexa_url(routeReference) }}">LINK</a> {% endfor %} {% endblock %}
- Move one of content relation to Trash
- go to view content
Result
After entering the view content, we receive an error:
An exception has been thrown during the rendering of a template ("Cannot generate a UrlAlias route for content without main Location.").
Expected Result
The error should not appear and the content should be generated correctly (without trashed content)
Note
Problem is with ibexa_route and ibexa_url