-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LPS-118500 Liferay unable to load Javascript resources when using a custom root context. | master #207
Conversation
…r.build() method will soon append.
To conserve resources, the PR Tester does not automatically run for every pull. If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed. If your pull was never tested, comment "ci:test" to run the PR Tester for this pull. |
ci:test:sf |
ci:test:relevant |
✔️ ci:test:sf - 1 out of 1 jobs passed in 3 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPS-118500-master 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#3455 |
Jenkins Build:test-portal-acceptance-pullrequest(master)#6701 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Indeed AbsolutePortalURLBuilderImpl seems to already take into account the context path
ci:forward |
CI is automatically triggering the following test suites:
The pull request will automatically be forwarded to the user
|
Skipping previously passed test suites: |
All required test suite(s) passed. |
Pull request has been successfully forwarded to brianchandotcom#92300 |
Description:
Steps to reproduce:
On master: Enable JQuery. Thus, in osgi/configs/ directory create the file:
com.liferay.frontend.js.jquery.web.internal.configuration.JSJQueryConfiguration.config
with following content:
enableJQuery="true"
On 7.2: JQuery is enabled by default.
Enter this URL in the browser http://localhost:8080/myportal/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=false&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin&js_fast_load=1
Check in the browser, under developer tools, the request URL generated:
http://localhost:8080/myportal/myportal/combo?browserId=other&minifierType=js&languageId=es_ES&b=7210&t=1596526812119&/myportal/o/frontend-js-jquery-web/jquery/jquery.min.js&/myportal/o/frontend-js-jquery-web/jquery/bootstrap.bundle.min.js&/myportal/o/frontend-js-jquery-web/jquery/collapsible_search.js&/myportal/o/frontend-js-jquery-web/jquery/fm.js&/myportal/o/frontend-js-jquery-web/jquery/form.js&/myportal/o/frontend-js-jquery-web/jquery/popper.min.js&/myportal/o/frontend-js-jquery-web/jquery/side_navigation.js
Please, note that context 'myportal' appears twice in the URL.
Solution proposed:
Analysis from debugging shows that in
modules/apps/frontend-js/frontend-js-jquery-web/src/main/java/com/liferay/frontend/js/jquery/web/internal/servlet/taglib/JQueryTopHeadDynamicInclude.java
,include()
method, combo servlet URL is built using root context.But next,
absolutePortalURLBuilder
object appends again root context -> and then we have the double context.So, I consider the initial combo servlet URL should avoid to add the root context.
Best.
Sergio.