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

[Bug or Feature?] url_path attribute value is not populated for any product #9113

Closed
MagePsycho opened this issue Apr 3, 2017 · 10 comments
Closed
Labels
Component: Catalog Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@MagePsycho
Copy link
Contributor

MagePsycho commented Apr 3, 2017

Preconditions

  1. Magento CE 2.1.1
  2. PHP 5.6
  3. Nginx 1.9

Steps to reproduce

  1. Try to save(new or existing) any product
  2. Go to MySQL client and check for url_path value for that product as:
    SELECT * FROM catalog_product_entity_varchar WHERE attribute_id IN ( SELECT attribute_id FROM eav_attribute WHERE attribute_code IN ('url_path') AND entity_type_id = 4 ) AND entity_id = <product_id>
  3. There won't be any result.
    In fact there is no any value at all on product level for url_path.

Expected result

  1. In such case, url_path value should look like [product-url-key][product-suffix-from-setting]

Actual result

  1. Empty value for url_path for any product

Queries:

  • is this a bug or feature?
  • If it's a feature any reason behind not populating the url_path value for products?
  • is it safe to delete all the url_path values for migrated products?
@veloraven
Copy link
Contributor

@MagePsycho thank you for your report.
Please report EE issues via the Support portal of your account or Partner portal if you are a partner reporting on behalf of a merchant.
Github is intended for Community edition reports given no account management for CE users. This will allow for proper tracking of issues at the account level.

@MagePsycho
Copy link
Contributor Author

@veloraven This is happening for both CE & EE.

@magento-engcom-team magento-engcom-team added G1 Passed Progress: needs update Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed G1 Passed Progress: needs update labels Sep 5, 2017
@okorshenko okorshenko added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Sep 14, 2017
@garfix
Copy link

garfix commented Oct 22, 2017

It is important to notice that starting to use a url_path for products will have an important performance penalty.

Currently it is already the case that when the url_key of a parent category changes, this affects the url_paths of all child categories. And the url_rewrite entries for these categories.

If a url_path for products is the be kept current, it will be the case that when the url_key of a parent category changes, this affects the url_paths of all both child categories and child products, recursively. This in turn will have an effect on all their url_rewrite table entries.

@keyurshah070
Copy link
Contributor

Started Investigating @okobchenko @ishakhsuvarov

@thiagolima-bm
Copy link
Member

I am working on it at #mm17es

@vrann vrann added the mm17es label Nov 4, 2017
thiagolima-bm added a commit to thiagolima-bm/magento2 that referenced this issue Nov 4, 2017
thiagolima-bm added a commit to thiagolima-bm/magento2 that referenced this issue Nov 5, 2017
thiagolima-bm added a commit to thiagolima-bm/magento2 that referenced this issue Nov 20, 2017
thiagolima-bm added a commit to thiagolima-bm/magento2 that referenced this issue Nov 21, 2017
@okorshenko okorshenko removed the mm17es label Jun 5, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Component: Catalog Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Aug 10, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas removed their assignment Aug 10, 2018
@sdzhepa
Copy link
Contributor

sdzhepa commented May 2, 2019

Hello @MagePsycho

Thank you for contribution and collaboration!

Internal Magento team has investigated the issue and as result, all related internal tickets were closed with resolution Won't Fix
Reason :

this ticket can be closed as url_path is deprecated.

@sdzhepa sdzhepa closed this as completed May 2, 2019
lenaorobei added a commit to XxXgeoXxX/graphql-ce that referenced this issue Jun 13, 2019
- added `@deprecated` tag to the `url_path`
- details magento/magento2#9113
@kasperth
Copy link

Hi @sdzhepa

From my understanding the url_path is still being used for categories. A new magento 2.4.3-p1 installation includes url_path for categories, and are also generated when creating new categories and updating already existing ones.

Can you refer to documentation about url_path and it being deprecated?
Thanks in advance.

@hostep
Copy link
Contributor

hostep commented Dec 21, 2021

@kasperth: there is no mention of categories in the opening post. This issue had to do with products.

But you are both correct though, the url_path of products is not used in Magento2, but the url_path of categories is definitely still being used 🙂

@tim-breitenstein-it
Copy link

Unfortunately there is a usage: ProductUrlPathGenerator.php#L79

This causes us URL-Rewrite bugs, because url_path is forced over url_key during Url path generation and canot be edited anymore.

@hostep
Copy link
Contributor

hostep commented Jan 4, 2024

Yep, I still don't understand why that code hasn't been thrown away (maybe backwards compatibility for merchants that still have that field filled in in their database and rely on it somehow, who knows ...)

Anyway, that's why you should keep the field empty in the database, if you want the url_key field to work.

(shameless advertisement: https://github.com/baldwin-agency/magento2-module-url-data-integrity-checker for a module to check for this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests