-
Notifications
You must be signed in to change notification settings - Fork 684
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
[TASK] Allow urls without .html for CMS. #936
Conversation
This pull request is automatically deployed with Now. |
@lewisvoncken can you add additional detail here and include an issue so that the team can review? |
placing on hold until detail is added |
@awilcoxa In Magento it is possible to use a suffix in the url which is a configuration option By default this option is set to .html but only for Catalog Urls Because of this the CMS page routing won't work correctly because these rewrites don't have .html To make CMS page routing work correctly it should allow urls without .html Besides that the functionality won't change and the support of a different suffix is also added through this change. |
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.
Thank you! Excellent addition, just needs the outer conditional to be reordered.
@@ -190,7 +190,7 @@ cmsPageResult: | |||
urlKey: | |||
when: | |||
- matches: request.url.pathname | |||
pattern: '^/(?:(.*)\.html)?' | |||
pattern: '^/(?:(.*))?' |
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.
This is the right idea (until we have the store config introspection requested in magento/graphql-ce#535) but it needs to go further down in the stack. Since CMS pages have no suffixes, they now live in the same namespace as some of our hardcoded routes, like checkout
. Those hardcoded routes need to resolve first--otherwise, an administrator could accidentally break their store by writing an SEO Friendly URL that conflicts with a builtin PWA route, AND, UPWARD would place the urlResolver call unnecessarily for every single request.
Description
Related Issue
Closes #ISSUENUM.
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Proposed Labels for Change Type/Package
Checklist: