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



      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

      7.1.x@0aace51dc8a30dae204bf98e4a61be8c14ec53ed: reproduced
      Master@e0630253a3e6d5f70c565e70031b93ef3254a8bb: 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


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



            • Assignee:
              harry.chai Harry Chai
              lino.alves Lino Alves
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Engineering Assignee:
              Lino Alves
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:
                Days since last comment:
                1 year, 2 weeks ago


                Version Package
                7.1.10 DXP FP13