Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3340

portal:inputRichText fails to render on Ajax request if render="false" on initial request

    Details

      Description

      Steps to reproduce:

      1. Change the portal:inputRichText attributes for the general.xhtml use case to include skipEditorLoading="false" (to attempt to load the required JS for inputRichText during Ajax) and rendered="#{!showcaseModelBean.selectedComponent.rendered}" (to ensure that the inputRichText is not loaded on initial page render).
      2. Navigate to the portal:inputRichText "General" example.
      3. Click the Rendered check box.

      If the bug still exists, the portal:inputRichText will not appear, and the following message will appear in the browser logs:

      Refused to execute script from 'http://localhost:8080/web/guest/portal-showcase/-/portal-tag/portal/inputrichtext//o/frontend-editor-ckeditor-web/ckeditor/ckeditor.js?browserId=other&minifierType=js&languageId=en_US&b=7006&t=1535034902742' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

      If the bug is fixed, no error message will appear, and the portal:inputRichText will appear.

      Workaround

      To work around this issue, always load the portal:inputRichText with rendered="true" on the initial page load (to ensure all the necessary resources are loaded). If you want to still hide the rich text editor on initial load, then set style="display: none;" and unset that via JavaScript (document.getElementById('#{inputRichText.clientId}').style.display = null) when you want to show the rich text editor.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.stiemann Kyle Stiemann
                Reporter:
                kyle.stiemann Kyle Stiemann
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: