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

Uncaught TypeError when using <liferay-ui:input-editor>

    Details

      Description

      For 6.2.x:

      1. Add the following to portal-ext.properties:
        editor.wysiwyg.test=bbcode
      2. Create a JSP page with the following:
        <%
        String test = "<script>alert(123)</script>";
        %>
        <liferay-ui:input-editor
                contents="foo"
        	editorImpl="editor.wysiwyg.test"
        	name="<%= test %>"
        	toolbarSet="bbcode"
        />
      3. View the rendered page in a browser

      Result
      Even though there is no pop-up show up, the following error displays in the browser console when the page is loading. Then the page is unclickable.

      Uncaught TypeError: Cannot read property 'bbCode' of undefined(...)

      Expected Result
      No javaScript error.

      For Master and 7.0.x EE:

      1. Add these properties:
        editor.wysiwyg.test1=alloyeditor
        editor.wysiwyg.test2=alloyeditor_bbcode
        editor.wysiwyg.test3=alloyeditor_creole
        editor.wysiwyg.test4=ckeditor
        editor.wysiwyg.test5=ckeditor_bbcode
        editor.wysiwyg.test6=ckeditor_creole
        editor.wysiwyg.test7=simple
        editor.wysiwyg.test8=tinymce
        editor.wysiwyg.test9=tinymce_simple
        
      2. Append the JSP codes to view.jsp of AP.
      3. Add an AP.
      4. Change editorImpl and then view the page.

      Result
      The following error displays in the browser console when the page is loading.

      Uncaught TypeError: Cannot read property 'attr' of null(...)

      Expected Result
      No javaScript error.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 18 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP44
                7.0.6 CE GA7
                7.0.0 DXP SP8
                7.0.X
                7.1.X
                Master