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

    Details

    • Branch Version/s:
      6.0.x
    • Similar Issues:
      Show 5 results 

      Description

      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
        rahulbats@gmail.com
      2. LPS-12140-build-59506.patch
        0.4 kB
        rahulbats@gmail.com

        Activity

          People

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

            Dates

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

              Development

                Structure Helper Panel