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

Handle the case where one switches from using the default .html URL suffix, to not using one #2373

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

hnsr
Copy link
Contributor

@hnsr hnsr commented Sep 19, 2024

When resolving an url foo.html inside redirectOrNotFound, this change will always add foo to the list of candidates to look up, regardless of the current StoreConfig.product_url_suffix value.

This allows you to turn off the default .html URL suffix in Magento and still have the old URLs redirect correctly.

@hnsr hnsr requested a review from paales September 19, 2024 07:01
Copy link

changeset-bot bot commented Sep 19, 2024

🦋 Changeset detected

Latest commit: 53ffc91

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 78 packages
Name Type
@graphcommerce/magento-store Major
@graphcommerce/address-fields-nl Major
@graphcommerce/algolia-search Major
@graphcommerce/magento-cart-billing-address Major
@graphcommerce/magento-cart-checkout Major
@graphcommerce/magento-cart-coupon Major
@graphcommerce/magento-cart-email Major
@graphcommerce/magento-cart-items Major
@graphcommerce/magento-cart-payment-method Major
@graphcommerce/magento-cart-pickup Major
@graphcommerce/magento-cart-shipping-address Major
@graphcommerce/magento-cart-shipping-method Major
@graphcommerce/magento-cart Major
@graphcommerce/magento-category Major
@graphcommerce/magento-cms Major
@graphcommerce/magento-customer-order Major
@graphcommerce/magento-customer Major
@graphcommerce/magento-payment-adyen Major
@graphcommerce/magento-payment-braintree Major
@graphcommerce/magento-payment-included Major
@graphcommerce/magento-payment-klarna Major
@graphcommerce/magento-payment-multisafepay Major
@graphcommerce/magento-payment-paypal Major
@graphcommerce/magento-product-bundle Major
@graphcommerce/magento-product-configurable Major
@graphcommerce/magento-product-downloadable Major
@graphcommerce/magento-product-grouped Major
@graphcommerce/magento-product Major
@graphcommerce/magento-review Major
@graphcommerce/magento-search Major
@graphcommerce/magento-wishlist Major
@graphcommerce/mollie-magento-payment Major
@graphcommerce/magento-graphcms Major
@graphcommerce/magento-product-simple Major
@graphcommerce/magento-product-virtual Major
@graphcommerce/google-datalayer Major
@graphcommerce/googleanalytics Major
@graphcommerce/magento-compare Major
@graphcommerce/magento-newsletter Major
@graphcommerce/magento-recently-viewed-products Major
@graphcommerce/magento-pagebuilder Major
@graphcommerce/algolia-mesh Major
@graphcommerce/algolia-personalization Major
@graphcommerce/magento-customer-account Major
@graphcommerce/demo-magento-graphcommerce Major
@graphcommerce/magento-graphql-rest Major
@graphcommerce/googletagmanager Major
@graphcommerce/docs Major
@graphcommerce/browserslist-config-pwa Major
@graphcommerce/changeset-changelog Major
@graphcommerce/eslint-config-pwa Major
@graphcommerce/graphql-codegen-markdown-docs Major
@graphcommerce/graphql-codegen-near-operation-file Major
@graphcommerce/graphql-codegen-relay-optimizer-plugin Major
@graphcommerce/next-config Major
@graphcommerce/prettier-config-pwa Major
@graphcommerce/typescript-config-pwa Major
@graphcommerce/cli Major
@graphcommerce/ecommerce-ui Major
@graphcommerce/framer-next-pages Major
@graphcommerce/framer-scroller Major
@graphcommerce/framer-utils Major
@graphcommerce/googlerecaptcha Major
@graphcommerce/graphql-mesh Major
@graphcommerce/graphql Major
@graphcommerce/hygraph-cli Major
@graphcommerce/hygraph-dynamic-rows-ui Major
@graphcommerce/hygraph-dynamic-rows Major
@graphcommerce/graphcms-ui Major
@graphcommerce/image Major
@graphcommerce/lighthouse Major
@graphcommerce/lingui-next Major
@graphcommerce/magento-graphql Major
@graphcommerce/next-ui Major
@graphcommerce/react-hook-form Major
@graphcommerce/framer-next-pages-example Major
@graphcommerce/framer-scroller-example Major
@graphcommerce/image-example Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
graphcommerce ✅ Ready (Inspect) Visit Preview Sep 19, 2024 7:05am
graphcommerce-hygraph-dynamic-rows-ui ✅ Ready (Inspect) Visit Preview Sep 19, 2024 7:05am
magento-2.4.7 ✅ Ready (Inspect) Visit Preview Sep 19, 2024 7:05am

@hnsr
Copy link
Contributor Author

hnsr commented Sep 19, 2024

Tried to check if a custom redirect such as bar.html > men still worked, but this gives a 404.

Screenshot 2024-09-19 at 09 46 07

This seems to be unrelated to this fix however, also does not seem to work on current demo: https://graphcommerce.vercel.app/en-gb/bar.html

@paales paales merged commit e941ee4 into canary Sep 19, 2024
9 checks passed
@paales paales deleted the feature/redirect-legacy-html-suffix branch September 19, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants