-
-
Notifications
You must be signed in to change notification settings - Fork 35
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 reset languageMain #192
base: main
Are you sure you want to change the base?
Conversation
Yes there is, for example if you change the fallback page. If you set |
The problem is actually the |
the same reset would happen if you submit the changes to the root page: Line 35 in 38ab7be
|
The reset only happens if all these conditions are met:
Due to the |
Again, you'll get this condition anyway. You'll not change type |
Yes, and in that case no reset will happen - in Contao versions prior to 4.9, because the form is not submitted after |
To fix this the database consistency check should probably be moved to another event and the callback should additionally check for |
How is |
The language assignments should not be reset while you are still editing the |
Consider the following scenario, where you set up a page like this:
example.org/en
(fallback)example.org/de
The site contains a lot of pages in both website roots and the pages in the
de
have their respective page in the main page tree (en
) assigned.However, later on it is decided to switch to a domain based setup, not using the language parameter in the URL:
example.org
(en)example.de
(de)But when you do that
terminal42/contao-changelanguage
currently resets thelanguageMain
assignment for all pages in theexample.de
website tree, meaning that the painstaking work of assigning all the pages the respective main page of the fallback language is lost.I do not think the extension should do that at all. Under normal circumstances, there is never a use case where you would want this to happen, is there?