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

[FIX] http_routing: ignore # when checking multilang URL #32059

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@nle-odoo
Copy link
Contributor

nle-odoo commented Mar 22, 2019

With 953a693 when a route is not found we assume it is a website.page
that can be multilang.

But the fix of #31792 we should once again test that all relative URL on
the website are multilang or not so an url like /web#home that was
considered not multilang before (because there is no route /web#home)
now is considered multilang.

With this fix, we only ignore the hash mark and URL fragment when
finding the URL's route (so we find that /web is not multilang).

related to #31792
related to opw-1922051

@nle-odoo nle-odoo added the OE label Mar 22, 2019

@nle-odoo nle-odoo force-pushed the odoo-dev:11.0-staging-nle branch from 279e928 to 3760d62 Mar 22, 2019

nle-odoo added a commit to odoo-dev/odoo that referenced this pull request Mar 22, 2019

[FIX] http_routing: ignore # when checking multilang URL
With 953a693 when a route is not found we assume it is a website.page
that can be multilang.

But the fix of odoo#31792 we should once again test that all relative URL on
the website are multilang or not so an url like `/web#home` that was
considered not multilang before (because there is no route /web#home)
now is considered multilang.

With this fix, we only ignore the hash mark and URL fragment when
finding the URL's route (so we find that /web is not multilang).

related to odoo#31792
related to opw-1922051
closes odoo#32059

@robodoo robodoo added the seen 🙂 label Mar 22, 2019

[FIX] http_routing: ignore # when checking multilang URL
With 953a693 when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

@nle-odoo nle-odoo force-pushed the odoo-dev:11.0-staging-nle branch from 3760d62 to 2689704 Mar 22, 2019

@nle-odoo

This comment has been minimized.

Copy link
Contributor Author

nle-odoo commented Mar 22, 2019

robodoo r+

robodoo pushed a commit that referenced this pull request Mar 22, 2019

[FIX] http_routing: ignore # when checking multilang URL
With 953a693 when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Mar 22, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 22, 2019

@nle-odoo nle-odoo deleted the odoo-dev:11.0-staging-nle branch Mar 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.