Description
Preconditions (*)
- php 7.4
- composer 1
- Magento version 2.4.2 enterprise
- RabbitMQ
Steps to reproduce (*)
- Have a multi store website (2-5 store views)
- Create a product that's connected to all stores make sure attribute code: visibility is on catalog,search
- Now go to backend Catalog -> Product. Select the created product and use the action update attributes.
- Now select a specific store view after change the attribute code: visibility to Not Visible Individually
- Now click on Save.
Expected result (*)
- Only the urls of the specific store for the specific product should be deleted in the url_rewrite table.
Actual result (*)
- ALL urls are removed of the specific product in the url_rewrite table and Admin UI - Marketing - URL Rewrites page
What my two cents tells me what it is.
I have debugged the issue and found out that the following observer does not take into account that the mass action can be done on store level (see
- https://github.com/magento/magento2/blob/2.4.3-p1/app/code/Magento/CatalogUrlRewrite/Observer/ProcessUrlRewriteOnChangeProductVisibilityObserver.php
- https://github.com/magento/magento2/blob/2.4.3-p1/app/code/Magento/CatalogUrlRewrite/Model/Products/AdaptUrlRewritesToVisibilityAttribute.php
While it does take account for the global way it does not take account that it can be set on store view. When you look at the dispatch of the event:
It does pass a store id. I think the store level should be taken into account to resolve this issue.
I believe this is a S1 problem there are workarounds by changing it in the database or changing everything manual but it's a lot of work to fix. And this could give merchant problems with their SEO while they are not aware of it.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status