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

Adding spaces to predefinedValue field of Documents and Media field causes Javascript exception

    Details

    • Branch Version/s:
      7.3.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Go to Content -> Web Content -> Structures
      2. Add a new Structure with a Documents and Media field in it
      3. Go to Source
      4. Add a whitespace to the DM field's predefinedValue field (eg: "en_US": " ")
      5. Try creating a Web Content using this structure

      You will receive the following error:

      Uncaught SyntaxError: Unexpected end of JSON input
          at JSON.parse (<anonymous>)
          at component.getParsedValue (?browserId=other&min...r-popover-min.js:94)
          at component.setValue (?browserId=other&min...r-popover-min.js:95)
          at component.syncValueUI (?browserId=other&min...r-popover-min.js:75)
          at component.renderUI (?browserId=other&min...r-popover-min.js:61)
          at YUI.<anonymous> (combo?browserId=othe...event-hover.js:1009)
          at Array.forEach (<anonymous>)
          at Function.YArray.each.YArray.forEach (combo?browserId=othe.../event-hover.js:602)
          at Function.Y.Array.invoke (combo?browserId=othe...event-hover.js:1009)
          at component.renderUI (?browserId=other&min...-popover-min.js:164)
      
      

      Expected behaviour: You are not able to save the structure with the whitespace in the predefinedValue field
      Actual behaviour: You are unable to perform any actions when creating a web content with this structure

       

      I make a space trimming on the predefined values, style and tip before we save the structure on the service side.

        Attachments

          Activity

            People

            Assignee:
            istvan.dezsi Istvan Dezsi
            Reporter:
            marcell.gyopos Marcell Gyöpös (Inactive)
            Participants of an Issue:
            Recent user:
            Rafaela Nascimento
            Engineering Assignee:
            Marcell Gyöpös (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              14 weeks, 4 days ago

                Packages

                Version Package
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.1 CE GA2 DXP 7,4
                7.4.2 CE GA3 DXP 7,4
                Master