pimcore / admin-ui-classic-bundle

Other
8 stars 96 forks source link

Bug: language switch #552

Closed AlternateIf closed 4 months ago

AlternateIf commented 4 months ago

for reference #333

after updating to the newest admin ui bundle i am still experiencing a bug for certain types of object definitions and the global language switch.

i created an example on the pimcore demo. not working object type: https://demo.pimcore.com/admin/login/deeplink?object_1166_object working object type: https://demo.pimcore.com/admin/login/deeplink?object_1165_object

i feel like it has to do with the different layouts for the 2 classes.

@kingjia90

markus-moser commented 4 months ago

Is this a duplicate of #515?

markus-moser commented 4 months ago

@AlternateIf Unfortunately the demo is resetted every few hours. Could you maybe send us a class definition file with which the problem happens?

kingjia90 commented 4 months ago

The problem seems unrelated to #333, i've detected that this toolbar is always null here and won't register this event https://github.com/pimcore/admin-ui-classic-bundle/blob/3a91315e74b2c118100d11e2eb24a788d31e6785/public/js/pimcore/object/tags/localizedfields.js#L429

Might be broken since https://github.com/pimcore/pimcore/pull/14466

AlternateIf commented 4 months ago

@kingjia90 @markus-moser i can confirm that the toolbar in the error case is null. that's what my tests concluded too. in fact it seems like the toolbar gets set but after the languageswitch is initialized. for the working example the toolbar is set before the initialization

here are the files to test Product is the working one ShopCategory is the one that fails

class_ShopCategory_export.json class_Product_export.json

markus-moser commented 4 months ago

@AlternateIf Thanks for the example classes. 👍 We found a solution and will provide a PR with the fix soon!

AlternateIf commented 4 months ago

awesome, thanks @markus-moser