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

"Uncaught TypeError: Cannot read property 'createURL' of undefined" when using a form with an upload field on a page with non-default theme

Details

    Description

      Steps to reproduce:

      1. Generate a dummy theme with the theme generator. You don't have to modify anything in it.
      2. Start up a DXP 7.1 and deploy the theme.
      3. Create a form with an Upload field.
      4. Place it on a page through the Form portlet.
      5. Visit the page URL and click on the Upload button to the right of the field.
      Checkpoint: The file selector popup is opened.
      6. Configure the page and apply the dummy theme to it.
      7. Visit the page URL and click on the Upload button to the right of the field.
      Result: Notice nothing happens, and there is an exception in the browser console:

      document_library_field.js:54 Uncaught TypeError: Cannot read property 'createURL' of undefined
          at component.getDocumentLibrarySelectorURL (document_library_field.js:54)
          at component._handleSelectButtonClick (document_library_field.js:233)
          at component._handleButtonsClick (document_library_field.js:181)
          at Y_Node.<anonymous> (oop.js:403)
          at Y.Subscriber.delegate.notifySub [as _notify] (event-delegate.js:173)
          at Y.Subscriber.notify (event-custom-base.js:1335)
          at Y.CustomEvent._notify (event-custom-base.js:998)
          at Y.CustomEvent._procSubs (event-custom-base.js:1124)
          at Y.CustomEvent.fireSimple (event-custom-base.js:1091)
          at Y.CustomEvent._fire (event-custom-base.js:1073)
      
      

      Possibly related: https://issues.liferay.com/browse/LPS-96889

      [email protected]: reproduced
      [email protected]: not reproduced. Works as expected.

      Attaching both dummy themes I used for testing (7.1 and master).

      This is not reproducible on master due to commit https://github.com/liferay/liferay-portal/commit/9022cf2698206131e4d9b68228b517fe3f195307

      Attachments

        1. Fixed.PNG
          Fixed.PNG
          44 kB
        2. sorin-master-theme.war
          3.04 MB
        3. sorintheme-theme.war
          3.27 MB

        Activity

          People

            harry.chai Harry Chai
            lino.alves Lino Alves
            Kiyoshi Lee Kiyoshi Lee
            Lino Alves Lino Alves
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 27 weeks, 1 day ago

              Packages

                Version Package
                7.1.10 DXP FP13
                7.1.X