Skip to content
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

44698 unnecessary redirects for multilingual pages with user-friendly urls #740

Conversation

yeneastgate
Copy link
Contributor

related to #731
Update user-friendly URLs for multilingual pages

Copy link

github-actions bot commented Feb 1, 2024

Pull Request Test Coverage Report for Build 9575964857

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 79.67%

Totals Coverage Status
Change from base Build 9563894875: 0.05%
Covered Lines: 8347
Relevant Lines: 10477

💛 - Coveralls

@fredericalpers fredericalpers added this to the v4.21 milestone Feb 1, 2024
@fredericalpers fredericalpers linked an issue Feb 1, 2024 that may be closed by this pull request
4 tasks
@fredericalpers fredericalpers added the QA Issue or Pull request that is in review label Feb 2, 2024
@fredericalpers fredericalpers added bug Indicates an unexpected problem or unintended behaviour component: property detail page Issue, Pull Request or Discussion related to property detail page component: dashboard Issue, Pull Request or Discussion related to dashboard / settings page labels Feb 20, 2024
@fredericalpers fredericalpers added the deploy test Triggers event to create test version label Jun 26, 2024
Copy link

Steps to install the approved version:

  1. Download onoffice-4.20-8-g951acaf4-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/9679713423.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@fredericalpers fredericalpers self-assigned this Jun 27, 2024
@fredericalpers fredericalpers added deploy test Triggers event to create test version and removed deploy test Triggers event to create test version labels Jul 10, 2024
Copy link

Steps to install the approved version:

  1. Download onoffice-4.20-14-g658034d7-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/9869874497.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@fredericalpers
Copy link
Member

@yeneastgate The initial issue has been resolved. However, a new issue has arisen.

There is a new redirect occurring. It appears that the URL is first being directed to the language directory with the German URL from https://w3pm.onofficeweb.com/detailseite/45-charmantes-landhaus-in-suedfrankreich/ and then redirected to the URL with the permalink in the desired language: https://w3pm.onofficeweb.com/en/detail-page/45-charming-country-house-in-the/. See attached screenshot.

Please investigate this behaviour.

redirect1

@dai-eastgate
Copy link
Contributor

@fredericalpers We have investigated, the cause of this 301 redirect to error is that the "objekttitel" data is obtained from API read estates call according to the current language selected on the detail page, so for switch languages ​​in the WPML, "objekttitel" will not be data according to the chosen language, it will be data of the current language on the detail page. Look at the illustration below:

image

To fix this error, the solution is to use the API to retrieve "objekttitel" according to the activated language by WPML. For each type of language option, there will be a corresponding "objekttitel"
=> I need 3 days to implement this issue. Thanks!

@fredericalpers
Copy link
Member

@dai-eastgate please go ahead and implement the recommended solution :)

@dai-eastgate
Copy link
Contributor

@fredericalpers Currently, I have implemented a trial version to resolve the status 301 error.
With the current solution, it is necessary to call APIs to retrieve the object title according to the languages ​​active in the WPML Plugin.
=> Please check the solution, test it again, and let me know your opinion

Below is the test video and performance compared to master:

740_videoCommentKhach.mp4

image

@fredericalpers fredericalpers added deploy test Triggers event to create test version and removed deploy test Triggers event to create test version labels Jul 23, 2024
Copy link

Steps to install the approved version:

  1. Download onoffice-4.20-22-g30a9a111-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/10060967182.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

Copy link

Steps to install the approved version:

  1. Download onoffice-4.20-22-g30a9a111-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/10141552194.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@andernath andernath merged commit 8624af7 into master Jul 29, 2024
3 checks passed
@andernath andernath deleted the 44698-unnecessary-redirects-for-multilingual-pages-with-user-friendly-urls branch July 29, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behaviour component: dashboard Issue, Pull Request or Discussion related to dashboard / settings page component: property detail page Issue, Pull Request or Discussion related to property detail page deploy test Triggers event to create test version QA Issue or Pull request that is in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary redirects for multilingual pages with user-friendly URLs
4 participants