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

Category URL Path issue in multi-store #38627

Open
1 of 5 tasks
Nuranto opened this issue Apr 17, 2024 · 20 comments · May be fixed by #38672
Open
1 of 5 tasks

Category URL Path issue in multi-store #38627

Nuranto opened this issue Apr 17, 2024 · 20 comments · May be fixed by #38672
Assignees
Labels
Area: Catalog Component: Url Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@Nuranto
Copy link
Contributor

Nuranto commented Apr 17, 2024

Preconditions and environment

  • Magento version 2.4.6 & 2.4.7

Steps to reproduce

  1. Create 2 stores ( default = 1, other_store = 2), same category root assigned.
  2. Create this category tree :
    • Cat A (url key = a in default view. url key = other_a in store 2)
      • Cat AB (url key = b in default view)
  3. Check catalog_category_entity_varchar table where attribute_id = (ID of url_path) and category_id = (ID of cat AB). You should see : a/b for store 0 and other-a/b for store 2.
  4. Check frontend canonical url for store2 - AB category page. You should see https://.../other-a/b
  5. Change url_key for cat AB, in default view, for b2
  6. Check again catalog_category_entity_varchar table where attribute_id in (ID of url_path) and category_id = (ID of cat AB).
  7. Check again canonical url for store2 AB category page.

Expected result

  • a/b2 for store 0 and other-a/b2 for store 2.
  • Url of category = https://.../other-a/b2, Canonical : https://.../other-a/b2

Actual result

  • a/b2 for store 0 and other-a/b for store 2.
  • Url of category = https://.../other-a/b2, Canonical : https://.../other-a/b

Additional information

No response

Release note

No response

Triage and priority

  • 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”.
Copy link

m2-assistant bot commented Apr 17, 2024

Hi @Nuranto. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

Copy link

m2-assistant bot commented Apr 17, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7 Indicates original Magento version for the Issue report. label Apr 17, 2024
Copy link

m2-assistant bot commented Apr 18, 2024

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash
Copy link

@magento give me 2.4-develop instance

Copy link

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

Copy link

@engcom-Dash
Copy link

Hi @Nuranto

Thanks for reporting and collaboration.

Verified the issue on magento 2.4 dev instance but the issue is not reproduceable.

Steps to reproduce

  1. Create 2 stores ( default = 1, other_store = 2), same category root assigned.
  2. Create this category tree : Cat A (url key = a in default view. url key = other_a in store 2) and Cat AB (url key = b in default view)
  3. Check catalog_category_entity_varchar table where attribute_id = (ID of url_path) and category_id = (ID of cat AB). You should see : a/b for store 0 and other-a/b for store 2.
  4. Check frontend canonical url for store2 - AB category page. You should see https://.../other-a/b
  5. Change url_key for cat AB, in default view, for b2
  6. Check again catalog_category_entity_varchar table where attribute_id in (ID of url_path) and category_id = (ID of cat AB).
  7. Check again canonical url for store2 AB category page.

We are seeing the below results :

a/b2 for store 0 and other-a/b2 for store 2.
Url of category = https://.../other-a/b2, Canonical : https://.../other-a/b2

Please refer the screenshots attached. Let us know if we have missed anything.

38627_store0 38627_store2

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Apr 19, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Apr 19, 2024
@Nuranto
Copy link
Contributor Author

Nuranto commented Apr 22, 2024

I did more test, on several projects I'm working on. Also tried with all third-extensions disabled. I can reproduce the issue in all cases.
I tried to change some configuration, but cannot manage to find the missing step to reproduce :/

Capture d’écran 2024-04-22 à 14 47 49

I also checked the code, i don't saw anywhere the code that updates the url_path on all stores. There's src/vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Category/UpdateUrlPath.php but it only deals with new categories (if ($category->isObjectNew()) and src/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php but it only deals with children.

I guess I'm missing something...

Copy link

m2-assistant bot commented Apr 25, 2024

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Delta
Copy link
Contributor

engcom-Delta commented Apr 25, 2024

Hi @Nuranto,

Verified the issue on 2.4-develop and it is reproducible.

Hence, Confirming the issue.

Steps to reproduce:-

1.Create 2 stores ( default = 1, other_store = 1), same category root assigned.
2.Create this category tree :
3.Cat A (url key = a in default view. url key = other-a in store 1)
Cat AB (url key = b in default view)
4.Check catalog_category_entity_varchar table where attribute_id = (ID of url_path) and category_id = (ID of cat AB).
You should see : a/b for store 0 and other-a/b for store 2.
5.Check frontend canonical url for store2 - AB category page. You should see https://.../other-a/b
6.Change url_key for cat AB, in default view, for b2
7.Check again catalog_category_entity_varchar table where attribute_id in (ID of url_path) and category_id = (ID of cat
AB).
8.Check again canonical url for store2 AB category page.

Please refer the attached screenshot.

Created one store other than default store

Screenshot 2024-04-25 at 10 58 24 PM

Same category assigned

Screenshot 2024-04-25 at 11 00 36 PM

Category A created and given url key = a in default view

Screenshot 2024-04-25 at 4 06 35 PM

url key = other-a in store 1 view

Screenshot 2024-04-25 at 4 09 41 PM

Category AB created and given url key = b in default view

Screenshot 2024-04-25 at 9 12 47 PM

Check catalog_category_entity_varchar table , a/b for store 0 and other-a/b for store 1.

Screenshot 2024-04-25 at 4 10 55 PM

frontend canonical url for store2 - AB category page. You should see https://.../other-a/b

Screenshot 2024-04-25 at 9 44 56 PM

Change url_key for cat AB, in default view, for b2

Screenshot 2024-04-25 at 9 46 11 PM

Check catalog_category_entity_varchar table

Screenshot 2024-04-25 at 3 59 41 PM

frontend canonical url for store2 - AB category page

Screenshot 2024-04-25 at 10 55 32 PM

@engcom-Delta engcom-Delta added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 25, 2024
@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 25, 2024
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@engcom-Delta engcom-Delta added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: needs update Additional information is require, waiting for response labels Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Needs Update to Confirmed in Issue Confirmation and Triage Board Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Confirmed to Needs Update in Issue Confirmation and Triage Board Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Needs Update to Confirmed in Issue Confirmation and Triage Board Apr 25, 2024
@m2-community-project m2-community-project bot added the Issue: needs update Additional information is require, waiting for response label Apr 25, 2024
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Confirmed to Ready for Confirmation in Issue Confirmation and Triage Board Apr 25, 2024
@engcom-Delta engcom-Delta added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Apr 25, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Apr 25, 2024
@engcom-Delta engcom-Delta added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Apr 25, 2024
@m2-community-project m2-community-project bot added this to Dev In Progress in High Priority Backlog Apr 25, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11859 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Apr 25, 2024

✅ Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-11859

2 similar comments
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-11859

@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-11859

@digitalrisedorset
Copy link

@magento I am working on this

@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Apr 26, 2024
@digitalrisedorset digitalrisedorset linked a pull request Apr 29, 2024 that will close this issue
5 tasks
@m2-community-project m2-community-project bot moved this from Dev In Progress to Pull Request In Progress in High Priority Backlog Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Catalog Component: Url Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

6 participants