Skip to content

Conversation

@mnediw
Copy link

@mnediw mnediw commented Jun 10, 2024

No description provided.

@dmitryd
Copy link
Owner

dmitryd commented Apr 1, 2025

There is no description of the change. Such pull requests cannot be accepted because it is unclear what it does.

@mnediw
Copy link
Author

mnediw commented Apr 1, 2025

You are absolutely right. Where has my description gone? Here it comes (again):

Say we have Records in sys_languages German (Default 0), English (1) and French (2).

With the original JS Code the buttons will look like this:
image

That looks completely right and the button for localizing to English will work as aspected. But the button for localizing to French will do completely crazy stuff: creates a second localisation to English instead.

This happens because the original code line 6 simply fetches the link from one of the buttons and sets this link to both buttons (adding &deepl=1). [So the error will not occur with only 1 language to localize to.]
And TYPO3 wont even check that there already is a localisation in this language and create a second. This will result in a complete data mess as TYPO3 cant work with 2 localisations of a record to the same language later on.

The new code iterates over all buttons and changes their links seperately.

@h-e-l-l-o-w-o-r-l-d
Copy link

Sounds like it is related to the bug described in #54?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants