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

URL rewrites are not generated when editing or duplicating a product #33884

Closed
1 of 5 tasks
densen45 opened this issue Aug 23, 2021 · 19 comments
Closed
1 of 5 tasks

URL rewrites are not generated when editing or duplicating a product #33884

densen45 opened this issue Aug 23, 2021 · 19 comments
Assignees
Labels
Component: UrlRewrite Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: ready for confirmation

Comments

@densen45
Copy link
Contributor

densen45 commented Aug 23, 2021

This issue occurs only when the Single-Store mode is enabled. It holds for editing existing products and creating duplicates as well. Below only the detailed steps for editing an existing product are provided to reproduce this issue. However, if you want to reproduce the issue for duplicating products, just duplicate an existing product and you will see, that no URL will be generated for the duplicate.

Preconditions (*)

  1. 2.4.2 or 2.4.2-p2

Steps to reproduce (*)

  1. Activate the Single-Store mode
  2. Create a product and add it to a category
  3. Go to the URL Rewrites page (Marketing > SEO & Search > URL Rewrites) and notice the generated URLs.
  4. Change the URL Key of the product and save it
  5. Go to the URL Rewrites page again

Expected result (*)

  1. URLs for the product were changed (like <category_key>/<product_key>.html and <product_key>.html).
  2. When you open the category on the frontend and hover over the product a correct URL (from above) should be previewed and opened by click.
  3. When you use the URL key to directly access the product on frontend like https://<the_domain>/<url_key>.html the page is found.

Actual result (*)

  1. No URL for the product were changed (no changed entry can be found on the URLs Rewrite page and in the DB (url_rewrite table) as well).
  2. When you open the category on the frontend and hover over the product an unaesthetic URL gets previewed (like https://<the_domain>/catalog/product/view/id/<product_id>/s/<product_url_key>/<category_id>/)
  3. When you use the URL key to directly access the product on frontend like https://<the_domain>/<url_key>.html the page is not found.

Probably related issues


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”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 23, 2021

Hi @densen45. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ 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, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@densen45
Copy link
Contributor Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @densen45. Thank you for your request. I'm working on Magento instance for you.

@densen45
Copy link
Contributor Author

I cannot reproduce the issue on 2.4-develop instance.

@densen45
Copy link
Contributor Author

@magento give me 2.4.2 instance

@magento-deployment-service
Copy link

Hi @densen45. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-November engcom-November self-assigned this Aug 23, 2021
@m2-assistant
Copy link

m2-assistant bot commented Aug 23, 2021

Hi @engcom-November. 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).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components 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.

@densen45
Copy link
Contributor Author

I'm closing this issue because I cannot reproduce it on 2.4-develop and 2.4.2 instances.

@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Aug 23, 2021
@densen45
Copy link
Contributor Author

@magento give me 2.4.2 instance

@magento-deployment-service
Copy link

Hi @densen45. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@densen45
Copy link
Contributor Author

densen45 commented Aug 23, 2021

I have now been able to reproduce the issue on a 2.4.2 instance. The key was to enable the Single-Store mode.

@densen45
Copy link
Contributor Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @densen45. Thank you for your request. I'm working on Magento instance for you.

@densen45 densen45 changed the title No URL Rewrites for duplicated products URL rewrites are not generated when editing or duplicating a product Aug 24, 2021
@densen45
Copy link
Contributor Author

densen45 commented Aug 24, 2021

I'm still not able to reproduce this issue on a 2.4-develop instance. Enabling Single-Store mode does not cause this issue. However, on a 2.4.2 instance, the issue still occurs.

@densen45
Copy link
Contributor Author

I have found the issue #25190 which provides the answer and the solution for this issue here in #25190 (comment).

I have checked the current 2.4-develop code and the three lines mentioned in the linked comment above were removed in this commit: 494eb40
Thus, I assume that removing these lines will not affect anything else.

So I have created a module that overrides the getStoreIds() function of the \Magento\Catalog\Model\Product class and got rid of the erroneous code. This solves the issue for editing and duplicating products as well.

I'm closing this issue because the fix was already released in 2.4.3.

@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Aug 24, 2021
@engcom-November engcom-November added Component: UrlRewrite Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UrlRewrite Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: ready for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants