Skip to content

Page resources translation incorrect #7

@schliesser

Description

@schliesser

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions