magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Import product CSV url_key for the default (without store_view_code) should not update the url key in the frontend

Open erwinschaap opened this issue 2 years ago • 49 comments

Preconditions and environment

  • Magento version 2.4.3
  • Anything else that would help a developer reproduce the bug: multistore setup with products

Steps to reproduce

  1. Create one product and update the url key so in each store view there is a different url key (see result for an example)
  2. After the creation, upload a product import CSV with that specific product sku, store_view_code empty and for the url_key a different URL-key than already used in the product (see result for an example)

Expected result

The default URL key is updating to the new url key and for the specific store_views the value for the url_key in the backoffice AS in the frontend visible is the same

default: jacked en: (default) jacked nl: jas fr: veste

import for default: sku,store_view_code,url_key 1,,jack

backoffice: default: jack en: (default) jack nl: jas fr: veste

frontend: default: jack en: (default) jack nl: jas fr: veste

The overrides are still doing their work.. This is expected

Actual result

The url_key in the backoffice for a specific store view is still the initial url_key provided by the store, but the url_key in the frontend visible is now the url_key uploaded by product CSV import.

default: jacked en: (default) jacked nl: jas fr: veste

import for default: sku,store_view_code,url_key 1,,jack

backoffice: default: jack en: (default) jack nl: jas fr: veste

frontend: default: jack en: (default) jack nl: jack fr: jack

So all urls in the frontend are now the same url for each store but in the backoffice there are overiddes. This is NOT correct!

Additional information

No response

Release note

No response

Triage and priority

  • [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • [X] 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”.

erwinschaap avatar Feb 22 '23 11:02 erwinschaap

Hi @erwinschaap. 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. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: 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.

m2-assistant[bot] avatar Feb 22 '23 11:02 m2-assistant[bot]

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: :point_down:

    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!

m2-assistant[bot] avatar Feb 22 '23 11:02 m2-assistant[bot]

@magento give me 2.4-develop instance

engcom-Dash avatar Feb 22 '23 11:02 engcom-Dash

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

Hi @engcom-Dash, here is your Magento Instance: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering Admin access: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering/admin_eee2 Login: 80ffc8d7 Password: 9e9594249150

@magento give me 2.4-develop instance

engcom-Dash avatar Feb 23 '23 09:02 engcom-Dash

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

Hi @engcom-Dash, here is your Magento Instance: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering Admin access: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering/admin_be27 Login: fdd434e2 Password: 14c2d499e8d0

Hi @erwinschaap ,

Could you please the share CSV file which you are utilising while import to reproduce the issue.That would be helpful for us to understand the expected result more clearly.

Thanks.

engcom-Dash avatar Feb 23 '23 10:02 engcom-Dash

We are experiencing this issue on 2.4.5-p1 too, the url keys for the store views in the admin area are ignored and the frontend is still using default scope url keys, "use default" is not ticked.

ryanpalmerweb avatar Mar 02 '23 10:03 ryanpalmerweb

Hi @ryanpalmerweb ,

Could please share your CSV file which is utilising for this issue ,It will be very useful for to reproduce this issue.

Regards,

engcom-Dash avatar Mar 06 '23 08:03 engcom-Dash

first.csv update.csv

If you first import first.csv you have the basic settings for the product. If you then update it with the update.csv you will see that the url key in the frontend is not correct and in each store the same as the default, but in the backoffice you will see the existing url key overrides. @engcom-Dash

erwinschaap avatar Mar 07 '23 07:03 erwinschaap

@magento give me 2.4-develop instance

engcom-Dash avatar Mar 07 '23 18:03 engcom-Dash

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

Hi @engcom-Dash, here is your Magento Instance: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering Admin access: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering/admin_6325 Login: 6f88942d Password: b2f615d2169d

@magento give me 2.4-develop instance

engcom-Dash avatar Mar 08 '23 10:03 engcom-Dash

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

Hi @engcom-Dash, here is your Magento Instance: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering Admin access: https://d9dca40b3d4faa95725e11adcc8682e0.instances.magento-community.engineering/admin_06a7 Login: f4f9e563 Password: b503b8daa422

Hi @erwinschaap ,

Thanks for Collaboration and Contribution,

Verified the issue in 2.4-develop instance,and the issue is not reproducible.

Preconditions: Magento Version 2.4-develop Instance PHP Version 8.1 Multiple Store Created.

Steps to Reproduce :

  • Install fresh magento instance
  • Create multi store in admin panel
  • Create one Product with URL key
  • After the creation, upload a product import CSV with that specific product sku, store_view_code empty with new URL key.
  • After import the CSV file Verify the URL key in Backend and Frontend.

Kindly Refer the below Screenshots:

Below Screenshots before Update the URL url1 url2 url3 url4 url5

Below Screenshots After update the CSV(New URL) file with url6 url7 url8

We are getting expected result which is the default URL key is updating to the new url key and for the specific store_views the value for the url_key in the Backend As well as in the frontend visible is the same.So this issue is not reproducible and Kindly provide more information if the issue is still reproducible.

Let us know if we are missing anything

Regards

engcom-Dash avatar Mar 13 '23 11:03 engcom-Dash

@engcom-Dash The only difference is that we had an override in the second store view (US in your case, so not default value but another URL key). If you then update the global url key via import (so with an empty store_view_code) you will find an reproductible path

erwinschaap avatar Mar 13 '23 13:03 erwinschaap

Hi @erwinschaap,

Thanks for quick response,

Issue confimred !

Verified the issue in 2.4-develop instance and its reproducible,Hence we are confirming the issue.

Preconditions: Magento Version 2.4-develop PHP version 8.1 Multi store created in admin panel

Kindly refer the below screenshots: After importing the new csv file without store view code 1.Default URL key is Update as per the New CSV file. im2 2.The New URL key(Which is create by admin)is not Updated,its showing with Initial url key im3 3.Front end image with Updated URL key. im1

Steps to Reproduce:

  • Install fresh magento instance
  • Create multi store in admin panel
  • Create one Product with URL key
  • After the creation, upload a product import CSV with that specific product sku, store_view_code empty with new URL key.
  • After import the CSV file Verify the URL key of Specific store view(US) and Default Store view and Front end

After we update with New CSV file with New URL key,It is updated in default store view and front end customer view.But the the New url key is not updated in Specific store view(US) its showing with initial URL key.So we are getting actual result as per the description and the issue is reproducible in 2.4-develop instance,Hence we are confirming the issue.

Regards,

engcom-Dash avatar Mar 14 '23 10:03 engcom-Dash

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

github-jira-sync-bot avatar Mar 14 '23 14:03 github-jira-sync-bot

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

m2-assistant[bot] avatar Mar 14 '23 14:03 m2-assistant[bot]

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar Mar 14 '23 14:03 github-jira-sync-bot

@engcom-Dash As per the discussion in the triage call, we need to check this issue with importing store views with the URL key.

engcom-Hotel avatar Mar 21 '23 11:03 engcom-Hotel

Hi @engcom-Dash. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit 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!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

m2-assistant[bot] avatar Mar 21 '23 11:03 m2-assistant[bot]

Hi @ryanpalmerweb ,

We rechecked the issue with our internal team and verified the issue in 2.4-develop instance and the issue is not reproducible.

We are getting expected result as per the description which is while updating the csv file with empty storeview code and new URL key...it is overridden all the store view(default store view and us store view) as well as front end also its updated with new URL key.

Kindly refer the below screenshots: Before updating the New URL key 1.For all store view url key allsw001 2.For Default store view url key def002 3.For Specific store view url key spesw003

After updating the New URL key 1.For all store view url key spwwithall 2.For Default store view url key spwwithdefault 3.For Specific store view url key spswwithglobal

Front end images with Updated URL key: 1.For Default store view url key frnendfordefa 2.For Specific store view url key frendforspsw

Steps to reproduce: 1.Install magento instance 2.Create Multiple store 3.Create a product with simple url key 4.After the creation, upload a product import CSV with that specific product sku, store_view_code empty with Different URl key. 5.Check all the store view URL key and Front end product URL key.

Let us know if we missing anything

Thanks!!!

engcom-Dash avatar Mar 28 '23 10:03 engcom-Dash

Hi @erwinschaap ,

We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

engcom-Dash avatar Apr 11 '23 06:04 engcom-Dash

Hi @engcom-Dash Is the issue fixed, and if so, where is the fix available? Is the issue already implemented and checked?

erwinschaap avatar Apr 11 '23 07:04 erwinschaap

@engcom-Dash I see in the previous note that you have tested it incorrect. The URL key in de stores are checked as use default, and then it is correct. But if you try without that (so not checked in both store views) you can see the problem

This is correct reproduction path: https://github.com/magento/magento2/issues/36905#issuecomment-1467858673

please take a close look at what I have said: https://github.com/magento/magento2/issues/36905#issuecomment-1466144841

erwinschaap avatar Apr 11 '23 11:04 erwinschaap