I'm using ibexa-site-api 6.1.2 with Ibexa 4.6.3.
Steps to reproduce:
In admin area, within a richtext field, embed an image. Save and publish.
The image is rendered correctly in admin preview.
On front-end, I'm trying to render that field using:
{{ ng_render_field(content.fields.text_area) }}
inside the template, but when I'm trying to check/visit in browser the page that contains that field, it keeps loading on and on in a infinite loop until the memory limit is hit.
I also tried with the Ibexa's default twig method and Ibexa's default Content type using:
{{ ibexa_render_field(content.innerContent, 'text_area') }}
but I get the same result => Infinite loop.
The only solution I've found so far, is to disable somehow the Netgen's functionality, according to the documentation, by adding this parameter in a yaml file:
bexa.site_access.config.default.ng_site_api.fallback_without_subrequest: false
Then, the page loads correctly and the richtext is rendered correctly as well.
I've checked the field's value in the database directly, and it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
<title ezxhtml:level="2">
<emphasis role="strong">Title - online</emphasis>
<emphasis role="strong"> und als App</emphasis>
</title>
<para> </para>
<ezembed xlink:href="ezcontent://43910" view="embed" ezxhtml:class="ez-embed-type-image">
<ezconfig>
<ezvalue key="size">fullwidth</ezvalue>
</ezconfig>
</ezembed>
<para>Text text <link xlink:href="ezurl://548" xlink:show="new"
xlink:title="Text test">
<emphasis role="strong">Testing</emphasis>
</link>. Testing. </para>
<para> </para>
<eztemplate name="button" ezxhtml:class="ez-custom-tag ez-custom-tag--attributes-visible">
<ezcontent>
<para> </para>
</ezcontent>
<ezconfig>
<ezvalue key="content">Test</ezvalue>
<ezvalue key="internal_link">
https://www.testing.com/testing</ezvalue>
<ezvalue key="form">none</ezvalue>
<ezvalue key="form_settings">none</ezvalue>
<ezvalue key="color">white</ezvalue>
<ezvalue key="align">center</ezvalue>
<ezvalue key="width">auto</ezvalue>
</ezconfig>
</eztemplate>
<para> </para>
</section>
As it can be seen, the embed element is defined in this XML content using ezembed
tag. If I remove the entire ezembed
code:
<ezembed xlink:href="ezcontent://43910" view="embed" ezxhtml:class="ez-embed-type-image"> <ezconfig> <ezvalue key="size">fullwidth</ezvalue> </ezconfig> </ezembed>
after clearing the cache, the page loads correctly and the richtext field is rendered as expected. Of course, without the embed image. Then, if I put back the embed tag/element, the inifinite loop is happening again.