dachcom-digital / pimcore-i18n

Pimcore - i18n Manager
Other
28 stars 18 forks source link

Redirect on object preview #82

Closed lorextera closed 3 years ago

lorextera commented 3 years ago
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

I defined a link generator to view the object preview in the Pimcore admin. The object preview works fine without the i18n bundle but doesn't with it.

That's what I expected:

[302] http://localhost/admin/object/preview?id=4525&time=1632231904801
[200] http://localhost/en/product/funky-pj4525?pimcore_object_preview=4525&_dc=1632231904

That's what I get:

[302] http://localhost/admin/object/preview?id=4525&time=1632231904801
[302] http://localhost/en/product/funky-pj4525?pimcore_object_preview=4525&_dc=1632231904
[200] http://localhost/en/product/funky-pj4525

In this scenario, Pimcore shows an object preview from the database instead of from the session. I suppose that the i18n ignores the pimcore_object_preview parameter. I'll investigate, I promise!

My i18n_dev.yml

i18n:
    mode: country
    locale_adapter: system
    default_locale: 'en'
    translations: ~
    zones:
        zone1:
            id: 1
            domains:
                - docker
                    - it
                        - error
                    - en
                        - error
            config:
                mode: country
                default_locale: 'en'
                locale_adapter: system
                translations: ~