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

Unhelpful validation error message when publishing web content with missing document link

    Details

      Description

      Issue
      If a link between a Documents & Media file and a Web Content Article is invalid, when attempting to publish, the error displayed isn't helpful to non-technical authors.

      Error: Unable to validate referenced file entry because it cannot be found with the following parameters: {groupId=[20118], uuid=[0e3af03d-3c94-2cd7-f2f7-2cb1016ee488], endPos=[322]}.

      Steps to Reproduce
      1. Configure Liferay to use CKEditor as the default web content editor in portal-ext.properties

      editor.wysiwyg.default=ckeditor
      editor.wysiwyg.portal-impl.portlet.ddm.text_html.ftl=ckeditor
      editor.wysiwyg.portal-web.docroot.html.portlet.announcements.edit_entry.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.bb_code.jsp=alloyeditor_bbcode
      editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.html.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.taglib.ui.discussion.jsp=ckeditor
      editor.wysiwyg.portal-web.docroot.html.taglib.ui.email_notification_settings.jsp=ckeditor
      

      2. Sign in and navigate to Control Panel > Content > Documents and Media
      3. Add an image file (or any file)
      4. Create a new Basic Web Content article.
      a. Add a Title
      b. Edit "Content" field
      c. Click on "link" icon in CKEditor toolbar.
      d. Click "Browse Server" button.
      e. Select the uploaded image (or file)
      f. Change default "Display Text" to something readable (e.g. "My Pic")
      g. Click "OK" button to insert link into "Content" field.
      h. Click "Source" button to display HTML code view

      <p><a href="/documents/20118/0/Screenshot+from+2019-09-06+08-16-13.png/0e3af03d-3c94-2cd7-f2f7-2cb1016ee406?t=1573837541051">My Pic</a></p>

      Edit the link to make it invalid

      <p><a href="/documents/20118/0/Screenshot+from+2019-09-06+08-16-13.png/0e3af03d-3c94-2cd7-f2f7-2cb1016ee488?t=1573837541088">my pic</a></p>

      (note the two "88" edits)

      14. Click "Publish" button

      Expected Result
      A non-technical error is displayed to help content authors identify broken document links when publishing fails due to validation error(s).

      Actual Result

      *Error:* Unable to validate referenced file entry because it cannot be found with the following parameters: {groupId=[20118], uuid=[0e3af03d-3c94-2cd7-f2f7-2cb1016ee488], endPos=[322]}.

      Reproduced In
      Master (896f13d991710dbbc49980cd80e3a3df6436c65b)

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            kimberly.chau Kimberly Chau (Inactive)
            Participants of an Issue:
            Recent user:
            Lee Jordan
            Engineering Assignee:
            Kimberly Chau (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              48 weeks, 4 days ago

                Packages

                Version Package
                7.1.10 DXP FP17
                7.1.10.4 SP4
                7.1.X
                7.2.10 DXP FP4
                7.2.X
                7.3.0 CE GA1
                7.3.10 DXP GA1
                Master