-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Do not translate the main record ID #70
base: main
Are you sure you want to change the base?
Conversation
I depend on the translation id of a translated model. In my setup I have translated content elements for each translation. Therefor I need to get the translation id. Changing the behaviour would crash some of my projects relying on the current implementation. As long there is a way to get the (internal) translation id and the change belongs to a new major, I'd fine to change it again. |
Any decisions on this? |
Not really… I hate to release v5 just because of this minority again, but changing it in v4 isn't a good option either 😢 |
It can't be hanging like this forever, if v5 is a must then it's a must. |
Well I fixed it for me by doing an if-else with v4 😇 |
How/where did you fix it? The current state causes a lot of confusion for our customers :( (in regards to the news_categories extension for example). |
@aschempp can you shed some light on your solution? Or just merge this PR in v5? 😅 who cares what version is it anyway. |
Maybe @aschempp uses a private fork - like we do in one project, because we also needed the untranslated ID |
isotope/core@9d3e457 and isotope/core@feff2d9 (according to the commit log) |
@qzminski would that help for fixing codefog/contao-news_categories#186 ? |
As suggested in #69, this fixes the issue of a translated model ID. Translating the model ID is likely to cause downstream issues e.g. if someone uses
$GLOBALS['TL_MODEL']
without knowning of DC_Multilingual.The existing
MultilingualTrait::getLanguageId()
should continue to work, as thelangPid
is still present (but possibly the same asid
).The only possible issue would arise if someone expects
$model->id
to be the translated record ID, but I cannot imagine why that would ever make sense./cc @Defcon0 @dmolineus