Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 5 results 

      Description

      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.

        Issue Links

          Activity

          Hide
          Michael Saechang added a comment -

          Committed on:
          Portal 6.2.x GIT ID: 12611b8df9572c88be2aed582202a9eee28ef5ae.

          Show
          Michael Saechang added a comment - Committed on: Portal 6.2.x GIT ID: 12611b8df9572c88be2aed582202a9eee28ef5ae.
          Hide
          Ginson Ren added a comment - - edited

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.

          User will see pageB's translation is overwritten by the translation of pageA in French and Dutch.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 16e673497cc0fb17129d4a3ffcba3cdea602b4e5.
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 228bcefc4e621f15b8999134ca552897c128524d.

          User will see pageB's translation displays correctly.

          Show
          Ginson Ren added a comment - - edited PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2. User will see pageB's translation is overwritten by the translation of pageA in French and Dutch. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 16e673497cc0fb17129d4a3ffcba3cdea602b4e5. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 228bcefc4e621f15b8999134ca552897c128524d. User will see pageB's translation displays correctly.
          Hide
          tuttifrutti added a comment -

          Hello,

          I'm using Liferay 6.1 CE GA2 (with patch installed) and I have the same problem with translation.
          So I have developed a hook : code found via github (nbr 12611b8df9572c88be2aed582202a9eee28ef5ae) and deployed this correction.
          The war file is correctly deployed but the error remains.

          Sure this issue is closed ?

          Thank you.

          Show
          tuttifrutti added a comment - Hello, I'm using Liferay 6.1 CE GA2 (with patch installed) and I have the same problem with translation. So I have developed a hook : code found via github (nbr 12611b8df9572c88be2aed582202a9eee28ef5ae) and deployed this correction. The war file is correctly deployed but the error remains. Sure this issue is closed ? Thank you.
          Hide
          tuttifrutti added a comment -

          Hello,
          Sorry for the previous comment.
          The hook was not correctly deployed.
          I need to restart the jboss server (hot deploy is not working for this hook - why ?).
          The hook works.

          Thanks.

          Show
          tuttifrutti added a comment - Hello, Sorry for the previous comment. The hook was not correctly deployed. I need to restart the jboss server (hot deploy is not working for this hook - why ?). The hook works. Thanks.
          Hide
          Caleb added a comment -

          Please can anybody tell me if this hook still exists on gitHub?

          Show
          Caleb added a comment - Please can anybody tell me if this hook still exists on gitHub?
          Hide
          tuttifrutti added a comment -

          I found the code here https://github.com/liferay/liferay-portal/commit/12611b8df9572c88be2aed582202a9eee28ef5ae#diff-a9b807d31decf709f51cef09ea9ec8fc
          The hook does'nt exist but you can create it on base of this correction.

          Hope this help you.

          Show
          tuttifrutti added a comment - I found the code here https://github.com/liferay/liferay-portal/commit/12611b8df9572c88be2aed582202a9eee28ef5ae#diff-a9b807d31decf709f51cef09ea9ec8fc The hook does'nt exist but you can create it on base of this correction. Hope this help you.
          Hide
          Leon added a comment -

          Indeed this code helps to solve the problem. I integrated it on our local system as a hook in LR 6.1.1 GA2 CE and it worked fine.

          Show
          Leon added a comment - Indeed this code helps to solve the problem. I integrated it on our local system as a hook in LR 6.1.1 GA2 CE and it worked fine.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                23 weeks, 2 days ago

                Development

                  Structure Helper Panel