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

Structures and templates referenced by web contents can be removed

    Details

      Description

      Steps to reproduce:

      1. Login as an admin
      2. Go to Control Panel > Web Content
      3. Add a new structure "MyStructure". Add any field type.
      4. Select "Manage Templates" in the action button of "MyStructure".
      5. Add a new template "MyTemplate". Add any content for the script.
      6. Add a new web content "MyContent".
      7. Test 1: Try to remove "MyStructure". You won't be allowed and the following message is displayed: "Required structures could not be deleted. They are referenced by templates." (OK)
      8. Test 2: Remove "MyTemplate". The operation is completed succesfully. This leaves "MyContent" without a default template. (WRONG)
      9. Test 3: Now remove "MyStructure". The operation is completed succesfully. This leaves "MyContent" without a structure and any data added to a field of the structure will be lost without warning.(WRONG)

      Even worse, in DB the article still references to the structureKey and templateKey of the removed structure and template, which might cause errors.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              eduardo.garcia Eduardo García
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 28 weeks ago

                  Packages

                  Version Package
                  6.2.0 CE M5
                  6.2.X EE