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

Choosing the Copy as New option throws a generic error when it should throw a specific error

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: 6.1.30 EE GA3, 6.2.0 CE M5
    • Component/s: Dynamic Data Lists
    • Labels:
    • Environment:
      LIFERAY VERSION: 6.1 GA2
      OPERATING SYSTEM: Windows 7
      APPLICATION SERVER: Tomcat 7.0
      JAVA VIRTUAL MACHINE: build 1.6.0_35-b10
      DATABASE: MySQL

      Description

      Choosing the Copy as New option throws a generic error when it should throw a specific error:
      A. The StructureDuplicateStructureKeyException is thrown at DDMStructureLocalServiceImpl.java:621[validate()] because it is trying to import a structure which already
      exists in the database.
      B. From here, the exception gets passed up the stack to ExportImportAction.java:321[importData()] where the default error case puts all errors as a LayoutImportException.
      C. Finally, export_import.jsp:89 sees that general error and gives the general response: an-unexpected-error-occurred-while-importing-your-file
      D. What should happen is ExportImportAction.java:321 should have a separate error case for StructureDuplicateStructureKeyException and post that error to the jsp file,
      also, the export_import.jsp:89 should add an extra error case for this new exception and output some text such as
      "you-are-trying-to-import-data-that-already-exists-in-the-database"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              luyang.tan Luyang Tan (Inactive)
              Reporter:
              james.lefeu James Lefeu (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 44 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M5