PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-12140

Document library edit functionality fails using the JCR hook and a different context


    • Branch Version/s:
    • Similar Issues:
      Show 5 results 


      The document library edit does not work when the context is changed and on using a JCR hook.

      The problem happens because CMD is going as empty string to the edit file action.

      On looking at edit_file_entry.jsp i found the hidden variable CMD in the form is not instantiated to anything. So i put a default value for it "Update".
      If i use this logic it fails at the JCRHook. The class DLFileEntryLocalService tries to delete the version of file if it already exists and if the version does not exist it catches NoSuchFileException and ignores it. The problem is JCRHook was throwing back SystemException and not NoSuchFileException and hence the code was failing. I changed JCRHook to throw back NoSuchFileException and it works.

      Please refer the patch i have attached

      1. LPS-12140-build-58521.patch
        0.8 kB
      2. LPS-12140-build-59506.patch
        0.4 kB



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


            • Created:
              Days since last comment:
              4 years, 46 weeks, 5 days ago


                Structure Helper Panel