zeroseven/z7_blog

Page resources translation incorrect

Opened this issue · 2 comments

By default in TYPO3 9 to 11 the resources field media is set to 'allowLanguageSync' = true. This enables the user to add different images for translations.

The z7_blog extension fetches the media files with a corresponding model. The model itself is translated, but the file references not.

How to reproduce

  • Tested with introduction package in TYPO3 11.5.3.
  • Language DK set to "strict_mode" (optional)
  • Create Blog list page with list element (all settings default) and translate page + content
  • Create Post page and add a image in resources
  • Translate page, switch resource to "custom value" and replace image
EN (default language) DK Description
image image Frontend Output of Blog list compared with modified menu_pages

Modified typo3conf/ext/bootstrap_package/Resources/Private/Templates/ContentElements/MenuPages.html:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">

    <f:if condition="{menu}">
        <f:render partial="Menu/SkipNavigation" arguments="{_all}" />
        <f:render section="Menu" arguments="{menu: menu}" />
    </f:if>

</f:section>
<f:section name="Menu">

    <f:if condition="{menu}">
        <ul>
            <f:for each="{menu}" as="page">
                <li>
                    {page -> f:debug()}
                    <f:image image="{page.files.0}" maxHeight="180" maxWidth="320" />
                    <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">{page.title}</a>
                    <f:render section="Menu" arguments="{menu: page.children}" />
                </li>
            </f:for>
        </ul>
    </f:if>

</f:section>
</html>

I think this is a general Extbase problem which can be reproduced in different extensions. Even the T3G Blog has the same issue with its featured_image:

EN (default language) DK
image image