Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medias inside Blocks get saved, but not loaded when using 'translated' => false, #1839

Closed
davidfaber opened this issue Sep 30, 2022 · 2 comments
Labels
type: enhancement New feature or request

Comments

@davidfaber
Copy link

Description

Whenever I create a block with a non-translateable medias-field in an environment, where I need translated medias in some other places, non-translated medias in blocks will get saved, but not displayed.

Thanks in advance!

Steps to reproduce

Create a block using a medias-field:

@twillBlockTitle('Video Slideshow')
@twillBlockIcon('slideshow')
@twillBlockGroup('app')

@formField('medias', [
    'name' => 'gallery_background',
    'label' => 'Hintergrundbild',
    'withVideoUrl' => false,
    'translated' => false,
])
    'block_editor'    => [
        'files' => ['category_icon'],
        'crops' => [
            'gallery_background' => [
                'default' => [
                    [
                        'name'  => 'default',
                        'ratio' => 16 / 9,
                    ],
                ],
            ],
        ],
    ],
    'media_library'   => [
        'translated_form_fields' => true,
    ],

Expected result

The image gets saved and loaded.

Actual result

The image gets saved over and over and over again, resulting in multiple Entries in the mediables-table.

Versions

@ifox
Copy link
Member

ifox commented Jan 31, 2023

Related to #483. At the moment enabling translated_form_fields is an all or nothing situation. The logic is made to fallback to the main language so that editors do not have to provide the same image for each language.

@ifox ifox added the type: enhancement New feature or request label Jan 31, 2023
@ifox
Copy link
Member

ifox commented Feb 10, 2024

Closing in favor of #483 which has been added to the roadmap.

@ifox ifox closed this as completed Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants