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

Deleting everything from Web Content structure Source throws "Syntax error: Unexpected end of JSON Input"

    Details

      Description

      Description
      When editing a Web Content Stucture's JSON in the Source tab, if you delete everything or delete the fields element, errors are thrown.

      Steps to Reproduce
      1. Go to Site Content -> Web Content -> (kebab) -> Structures
      2. Add a structure
      3. Add an element to the Structure in the View tab (ex. a Date)
      4. Go over to the Source Tab and delete all contents of it.
      5. Go back to the View Tab.

      Expected Result: No errors are thrown in the browser's console
      Actual Result: An error is thrown, Uncaught SyntaxError: Unexpected end of JSON input.

      6. Refresh the page and return to the Source tab
      7. Delete the Fields element (only availableLanguageId and defaultLanguageId should be left).

      Expected Result: No errors are thrown in the console
      Actual Result: Uncaught TypeError: Cannot read property 'forEach' of undefined is thrown in the console.

        Attachments

        1. Fixed.gif
          Fixed.gif
          565 kB
        2. Fixed70.gif
          Fixed70.gif
          551 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 12 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP SP2
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.1.X
                  Master