[Bug or Feature?] url_path attribute value is not populated for any product
MagePsycho opened this issue · comments
Preconditions
- Magento CE 2.1.1
- PHP 5.6
- Nginx 1.9
Steps to reproduce
- Try to save(new or existing) any product
- 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>
- There won't be any result.
In fact there is no any value at all on product level for url_path.
Expected result
- In such case, url_path value should look like
[product-url-key][product-suffix-from-setting]
Actual result
- 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?
@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.
@veloraven This is happening for both CE & EE.
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.
Started Investigating @okobchenko @ishakhsuvarov
I am working on it at #mm17es
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.
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.
@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 🙂