core icon indicating copy to clipboard operation
core copied to clipboard

DEFAULT_PAGE_TO_DEFAULT_LANGUAGE prevents you from selecting another language in Edit mode

Open wezell opened this issue 11 years ago • 4 comments

When you have DEFAULTPAGETODEFAULTLANGUAGE=true you should be able to switch back and forth between languages in Edit mode. It should work exactly as it does now. If DEFAULTPAGETODEFAULTLANGUAGE=false and there is no version in the other languages, then you should not be able to switch.

screen shot 2015-02-10 at 3 45 53 pm

wezell avatar Feb 10 '15 20:02 wezell

Need to do the following here

  1. Abstract the method at line https://github.com/dotCMS/core/blob/master-3.1/src/com/dotmarketing/velocity/VelocityServlet.java#L438 it is copied and pasted multiple times This was started in https://github.com/dotCMS/core/tree/issue-7223-DEFAULT_PAGE_TO_DEFAULT_LANGUAGE Checkout this branch and update to the latest master
  2. Get a new starter so we can test with HTML as Pages content. starter.dotcms.com:8080
  3. For pages as content pages in the language drop down in EditMode we need to show ALL languages but the languages which the page does NOT exist in will be greyed
  4. ASSUMING DEFAULT_PAGE_TO_DEFAULT_LANGUAGE =true You CAN select the greyed out languages which will show the page in the Default Language swapping the language session variable.
  5. If you click page properties from Edit Mode while selected on a greyed out languages see point 4 above then you goto the Default page version for editing the page

In addition to this currently IF you goto a page that exists in only 1 languages and the DEFAULT_PAGE_TO_DEFAULT_LANGUAGE=true and in Edit Mode you manually alter the queryString to change the language session variable you get a 500 error.

jtesser avatar Feb 11 '15 15:02 jtesser

To be clear: If DEFAULT_PAGE_TO_DEFAULT_LANGUAGE is set to false, only the languages that the page exists in should be in the combo box.

If DEFAULT_PAGE_TO_DEFAULT_LANGUAGE is set to true, languages that the page does not exist in will be in the combo box grayed out. If you select a grayed out language, you are actually viewing the page in the default language but any content on the page that is multilingual should display based on the rules regarding DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE.

brentgriffin avatar Feb 18 '15 20:02 brentgriffin

Working as expected.... Tested on nightly build 2015-02-17 // Postgres // FF

bryanboza avatar Feb 18 '15 21:02 bryanboza

Added test case http://qa.dotcms.com/index.php?/cases/view/56645

shaydotcms avatar Apr 23 '15 20:04 shaydotcms