Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.4.2
-
None
-
None
-
Unknown
-
N/A
-
N/A
-
Description
Normally when creating a page from a template, the created page does not keep the locale from the template (which is often the root locale), but gets the locale active for the user creating the page.
If a page is created via change request from a template, this does not happen. The page keeps the root locale. (This has surfaced because of a different issue: https://jira.xwiki.org/browse/XWIKI-20575 but even if that one is fixed, having a page without locale might create some issues e.g. for the stemmer in the search when indexing.)
How to reproduce: Needs a template with no locale and without a "save & edit" action (which is not yet supported.
Such a predefined template is located in the "Movies" demo application.
- Fresh XWiki install 14.10.3, hsql-jetty package, "Change Request" installed
- Go to the "Movies" application http://localhost:8080/xwiki/bin/view/Help/Applications/Movies/ (or look it up from the overview of the "AppWithinMinutes" start page: Application panel, expand "More Application", click "Create your own"; on next page click "Movies")
- click button "add new entry", type in a title and click icon (or use the "Create" button, and on the following page type in a title, but keep the "Movies" template preselected, then "Request for creation".)
- on the following edit view for the movie fill in values, if you want, and then click "Save as Change Request"
- add yourself as approver (for simplicity, still possible due to another issue), and save
- Review -> Approve change request; then Merge
- go to the approved page and check in the "Info" tab
Expected result: Locale is "English"
Actual result: Locale is "None"
Compare with a direct creation of a Movie: there the Locale is "English" after creation.
Note: if the template already has a Locale (i.e. not "None"), then the problem does not appear.