Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-118843

DDFormField fieldNamespace is not guaranteed to be unique

    Details

      Description

      This issue can only be reproduced by chance or extensive overuse, as random calls are involved. I can share 2 scenarios to simulate it:

      Simulation steps #1, using DB manipulation

      1. Go to Content & Data > Web Content, select Structures
      2. Create a Structure with a text and a text area field
      3. Go back to Web Content and create an instance of this structure with values "foo" and "bar"
      4. Find this entry in the journalarticle table and edit its content column
      5. Copy the `instance-id` of the first `dynamic-element` to the second and execute the update to the database
      6. Go to Control Panel > Server Administration and Clear the database cache.
      7. Open the Web Content for Edit

      Simulation steps #2, using debugger

      1. Start Liferay with debugging enabled
      2. Go to Content & Data > Web Content, select Structures
      3. Create a Structure with a text and a text area field
      4. Attach a breakpoint here
      5. Go back to Web Content and create an instance of this structure
      6. The debugger will stop two times (one for each field), both times, execute `fieldNamespace="test"`
      7. Fill out the fields with "foo" and "bar" and save the Web Content
      8. Open the Web Content for Edit

      Expected result: Apart from the manipulation (like in a case of using up all possible instance-ids, so by using 26^4=456976 + 1 fields) Both values are at the correct place.
      Actual result: One of the values is duplicated and the other can't be seen.

        Attachments

          Activity

            People

            Assignee:
            dereck.portela Dereck Portela
            Reporter:
            balazs.safrany-kovalik Balázs Sáfrány-Kovalik
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              35 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 DXP FP96
                7.0.10.15 DXP SP15
                7.0.X
                7.1.10 DXP FP20
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP9
                7.2.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master