core: Translations from profiler don't map

Translations from the symfony translation panel don’t map to the record. You can hit the edit button, change the value and even pressing the save and sync button show nothing unusual, except the submitted value doesn’t map to the record. Changes are saved in the panel, which are visible if you attempt to edit the fields again, but they either don’t submit properly or they are not retrieved properly.

new xpertdata nl__profiler_9946e7_panel=translation (1) This button doesnt do anything. It shows a loading icons for a couple of seconds and a message “Started synchronization of all translations”, except nothing happens. Could also be stuck in a loop.

new xpertdata nl__profiler_9946e7_panel=translation (3) Fallback always shows 0.

new xpertdata nl__profiler_9946e7_panel=translation Neither the sync buttons, nor the add selected messages seems to do the trick. They show the same loading animation and also nothing further seems to happen.

new xpertdata nl__profiler_9946e7_panel=translation (2) This is what you see when you press the edit button.

I took the effort to browse through all languages of the localeswitcher on the frontend to make sure it wasn’t accidentally mapped to the wrong language for whatever reason.

This is my boltforms field config for the record.

        fields:
            company:
                type: text
                options:
                    required: true
                    label: companyname
                    constraints: [ NotBlank, { Length: { 'min': 2, 'max': 128 } } ]
            name:
                type: text
                options:
                    required: true
                    label: name
                    constraints: [ NotBlank, { Length: { 'min': 2, 'max': 128 } } ]
            phonenumber:
                type: text
                options:
                    required: true
                    label: phonenumber
                    constraints: [ NotBlank, { Length: { 'min': 2, 'max': 128 } } ]
            email:
                type: email
                options:
                    required: true
                    label: email
                    constraints: [ Email ]
                    help: "test"
            message:
                type: textarea
                options:
                    required: true
                    label: message
                    attr: 
                        rows: 6
            contactpreference:
                type: choice
                options:
                    label: contactpreference
                    choices:
                        email: email
                        phonecall: phonecall
                    multiple: false
                    expanded: true
            submit:
                type: submit
                options:
                    label: submit
                    attr:
                         class: 'form-button'

This shows my services.yaml setup. no other values have been changed:

parameters:
    locale: 'nl'
    # This parameter defines the codes of the locales (languages) enabled in the application
    app_locales: nl|en|fr|cz|sk
    app.notifications.email_sender: anonymous@example.com
    bolt.table_prefix: bolt_
    bolt.backend_url: /bolt


services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
        public: false       # Allows optimizing the container by removing unused services; this also means
                            # fetching services directly from the container via $container->get() won't work.
                            # The best practice is to be explicit about your dependencies anyway.
        bind:               # defines the scalar arguments once and apply them to any service defined/created in this file
            $locales: '%app_locales%'
            $defaultLocale: '%locale%'
            $emailSender: '%app.notific'

This shows my contentypes config for the record:

pages:
    name: Pages
    singular_name: Page
    fields:
        title:
            type: text
            localize: true
            class: large
            group: content
        teaser:
            type: textarea
            localize: true
            postfix: |
                A text-only version of the content, that can be used to "tease"
                the content when it's used in listing pages or search results.
        image:
            type: image
            localize: true
            label: Highlighted image
        body:
            type: redactor
            localize: true
            height: 300px
        slug:
            type: slug
            localize: true
            uses: title
            group: Meta
        laik:
            type: text
            group: Meta
        template:
            type: templateselect
            filter: '/^(?!partials)[^_].*\.twig$/'
    locales: ['nl', 'en', 'fr']
    records_per_page: 5
    order: id

Details

Question Answer
Relevant Bolt Version 5.0.0
Install type composer install bolt:setup
BC Break no
PHP version 7.3.28
Web server Apache
For UX/UI issues Brave, chromium, windows10

Bug summary

Translated labels don’t save properly. The record cannot show the changes. The profiler translation backend shows the edited fields while still unrefreshed. It shows the edited value if you hit edit again. This either means they don’t write properly to their locations or they are not retrieved properly.

Specifics

Any yourdomain.TLD/_profiler/ID?panel=translation should show the same behavior. the translations folder is currently only holding a .gitignore file it fails to produce the xml type files which would normally store the values.

Expected result

  • values saved, stored and visible on page

Actual result

  • loading and then no effect.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

👋 Hey! Was this recently fixed here bolt/project#85?

I have been unable to verify. I will get back to this.