elgentos / magento2-prismicio

Magento 2 Prismic integration
GNU General Public License v3.0
38 stars 18 forks source link

Url rewrites being created for document types that have not been allowed in the admin #121

Open PhilipRowe opened 3 months ago

PhilipRowe commented 3 months ago

Url rewrites are being created even when the type has not been allowed in the admin. Elgentos\PrismicIO\Controller\Webhook\Url is checking if any types have been allowed, but there isn't any support for checking if a document is in the allowed list of types before creating the url rewrite.

This means that url rewrites are being created for types that are not pages and this can cause clashes with urls on Magento.

see https://github.com/elgentos/magento2-prismicio/pull/120 for a potential fix.