Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
When you go to Manage Pages from the Dockbar, and click around different pages, if you go to submit after viewing different pages, the translations for different page values will be overwritten.
Here's how to reproduce:
- Go to Manage > Site Pages through the Dock bar
- Create 2 pages (pageA, pageB)
- Add translation for pageA in French and in Dutch (can be any language)
- Save pageA > the result is ok, pageA has the good translations in French and in Dutch
- Change to the pageB in the page tree on the left side of the layout editing page by clicking on this > the right side of the popup will be refreshed
- Add translation for pageB in French
- Save pageB > pageB has the translation of the pageA in French and Dutch
This is because of the on hide listener that's added in input_localized/page.jsp.
What's happening is that PanelFloating listens to the submitForm event and hides it's panel. However, in the input_localized file, the hide callback is appending to the form (this is needed in order to make sure the fields are a part of the submitted form).
But what's happening in Manage Pages, is that the form is being replaced via ajax. The form fields exist in memory (they're just removed from the DOM), but the callback listener is looking up the form via document.<portlet:namespace /><%= formName %>.
So whenever it goes to hide (in this case, right before the form is submitted the server), all of the panels from the previous pages all look up that property and append their nodes to the current form.
Instead of looking up the property at call time, we need to store a reference to the form, so that the callback appends the field to the original form it was created with.