-
Notifications
You must be signed in to change notification settings - Fork 86
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
Products/categories or any other page with "pg" or "page" on the URL will request cms/page API #1387
Comments
@franciscombrito Can you please be more specific where exactly in an example URL
|
Hi Stefan, In our case we have multiple products containing the "PG". Answering you question I believe is everytime you have something like "-pg" which will match the regex: Cheers |
* reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page) * replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences) * updated project configuration to consistently use the Angular 15 standard configuration of `ES2022` that includes `replaceAll` - `replaceAll('pg', 'Pg')` could be replaced by `replace(/pg/g, 'Pg')`
* reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page) * replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences) * updated ts configuration to use the Angular 15 standard configuration of `ES2022` for `lib` that includes `replaceAll` - `replaceAll('pg', 'Pg')` could be replaced by `replace(/pg/g, 'Pg')`
* reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page) * replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences) * updated ts configuration to use the Angular 15 standard configuration of `ES2022` for `lib` that includes `replaceAll` - `replaceAll('pg', 'Pg')` could be replaced by `replace(/pg/g, 'Pg')`
* reordered check for routing matches to first check product routes then category routes and at the end content page routes (to be less eager to assume it is a content page) * replace all occurences of object markers (pg, prd, ctg) in slug data instead of only the first (to prevent unintended object markers with multiple occurences) * updated ts configuration to use the Angular 15 standard configuration of `ES2022` for `lib` that includes `replaceAll` - `replaceAll('pg', 'Pg')` could be replaced by `replace(/pg/g, 'Pg')`
Actual Behavior
Products/categories or any other page with "pg" or "page" on the URL will request cms/page API
Expected Behavior
Having page/pg in the URL shouldn't trigger the CMS page api
Steps to Reproduce the Bug
Steps to reproduce the behavior:
Environment Details
Cause:
// matcher to check if a given url is a content page route
const contentRouteFormat = /^/(?!page/.$)(.-)?pg(.*)$/; (github formating is modifiying the original regex)
AB#84574
The text was updated successfully, but these errors were encountered: