-
Notifications
You must be signed in to change notification settings - Fork 0
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
LPP-26493 #361
LPP-26493 #361
Conversation
…lt locale when generating alternate urls for the root site
… included; localization will eventually be re-added if needed, as the next lines generate alternate urls with localization
…same as the canonical url
Pull request test invoked at http://test-1-21.liferay.com/job/test-portal-acceptance-pullrequest(master). |
The pull request tester is still running.Please wait until you get the final report before running 'ci:retest'. See this link to check on the status of your test: However, the pull request was closed.The pull request was closed because the following critical batches had failed: For information as to why we automatically close out certain pull requests see this article. *This pull will no longer automatically close if this comment is available. If you believe this is a mistake please re-open this pull by entering the following command as a comment. ci:reopen Critical Failure Details:test-portal-acceptance-pullrequest-batch(master)/source-format-jdk8Job Results:0 Tests Passed.
|
ci:reopen |
ci:retest |
Pull request test invoked at http://test-1-6.liferay.com/job/test-portal-acceptance-pullrequest(master). |
Hi @SamZiemer, I just received a comment from a related ticket: LPS-74272#comment-1097963 I'll be working on adding the integration tests, should I close this pr? |
Hi Eric, yeah go ahead and close this PR and re assign the tickets to yourself while you work on the integration tests, thanks for letting me know! |
ci:stop |
Hi @SamZiemer,
Original Tickets:
LPP-26493
LPS-74031
Main Issue
Currently, canonical URLs do not account for localization. This means that every page, regardless of which locale you are viewing it from, currently uses the same canonical URL.
For example, for the URL: http://localhost:8080
The canonical URL is http://localhost:8080
For a localized example, for the URL: http://localhost:8080/fr/
The canonical URL is currently also http://localhost:8080
This is an issue, since http://localhost:8080 and http://localhost:8080/fr/ should each have it's own canonical url.
The expected canonical URL for this case should be: http://localhost:8080/fr/
Note: Below will be a section with some example scenarios to further describe expected results related to this issue
Second Issue
Currently, alternate URLs are not being generated properly in several cases.
There was an attempt to resolve this for certain cases in LPS-72431.
Even then, the changes introduced did not work properly at times.
This can be seen in a recent ticket: LPS-74272
The changes introduced in this pr should address generating the proper alternate URLs for the two tickets mentioned above as well.
In addition, this pr will also handle providing the proper url for the x-default hreflang tag.
Note: Below will be a section with some example scenarios to further describe expected results related to this issue
The fixes for this pr also accounts for other factors, such as:
Please let me know if you have any questions.
Thanks!
A Few Example Scenarios - Main Issue
To better describe the goals of the fix regarding canonical URLs, here are expected results from some scenarios.
Default Site (using default locale - en_US)
URL: http://localhost:8080
Expected Canonical URL: http://localhost:8080
URL: http://localhost:8080/en_US/
Expected Canonical URL: http://localhost:8080
URL: http://localhost:8080/web/guest/home
Expected Canonical URL: http://localhost:8080
Default Site (using non-default locale - fr)
URL: http://localhost:8080/fr/
Expected Canonical URL: http://localhost:8080/fr/
URL: http://localhost:8080/fr/web/guest/home
Expected Canonical URL: http://localhost:8080/fr/
Created site called testsite with second created public page testpage2 (using default locale - en_US)
URL: http://localhost:8080/web/testsite/testpage2
Expected Canonical URL: http://localhost:8080/web/testsite/testpage2
URL: http://localhost:8080/en_US/web/testsite/testpage2
Expected Canonical URL: http://localhost:8080/web/testsite/testpage2
Created site called testsite with second created public page testpage2 (using non-default locale - fr)
URL: http://localhost:8080/fr/web/testsite/testpage2
Expected Canonical URL: http://localhost:8080/fr/web/testsite/testpage2
A Few Example Scenarios - Second Issue
To better describe the goals of the fix regarding alternate URLs, here are expected results from some scenarios. For these examples, we will only include a snippet of the hreflang tags to reduce the amount of space used.
Default Site (using default locale - en_US)
URL: http://localhost:8080/web/guest/home
Default Site (using non-default locale - fr)
URL: http://localhost:8080/fr/web/guest/home
Created site called testsite with second created public page testpage2 (using default locale - en_US)
URL: http://localhost:8080/web/testsite/testpage2
URL: http://localhost:8080/en_US/web/testsite/testpage2
Created site called testsite with second created public page testpage2 (using non-default locale - fr)
URL: http://localhost:8080/fr/web/testsite/testpage2