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

Portlets depoloyed to non-standard context fails to load resources when added to page via ajax

    Details

      Description

      When a plugin portlet is deployed to a non-standard context (e.g. by setting recommended-deployment-context=) adding the portlet via the add menu (which uses an ajax render portlet request, will fail to properly load js/css resources.

      Subsequent rendering of the portlet with a full page refresh does not result in the same issue.

      • What you need is a portlet with some resources defined in one or more of these liferay-portlet.xml settings (microblogs-portlet is ideal):

      header-portal-css
      header-portal-javascript
      header-portlet-css
      header-portlet-javascript
      footer-portal-css
      footer-portal-javascript
      footer-portlet-css
      footer-portlet-javascript

      • in that portlet edit the liferay-plugin-package.properties file
      • add recommended-deployment-context=<some different context name> property
      • deploy the plugin
      • then add the portlet to the page via the "Add menu"
      • it should result in 404 errors in the browser (you may have to use a network debuging tool to see the network errors)
      • the result of the error will be that the dependent js and or css in those resources is not loaded which may cause either js errors or UI to not render how it should

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 31 weeks ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.2 CE GA3
                  6.1.30 EE GA3