Comments (10)
Hi @senders
The problem with the url_path
attribute for products is that it influences the url rewrites, but you can't manipulate the value of that attribute using the backend of Magento.
Which means that if you want to change the url_key
and thus the url rewrite of a product using the backend of Magento, it won't be possible because the "hidden" url_path
attribute has precedence over the url_key
attribute.
The url_path
attribute for products is a remainder from the old Magento 1 days where it behaved a bit differently. Somehow it was included in Magento 2, even though the behavior changed and it actually never gets filled up with data if you create a product using the backend of Magento. Thus it's a bit a meaningless field, even though it's still being used in generating url rewrites, which is very weird and can probably be considered as a bug in Magento 2.
So the recommendation is to always have the url_path
attribute of products as empty.
We've seen that url_path
attribute getting filled up many times in the past for shops that were migrated from Magento 1 to Magento 2 using the magento data migration tool, it was a bug for a long time in that tool, but was fixed in version 2.3.5 of that tool by magento/data-migration-tool@b5ad54f
In your case, if you see this problem pop up even after new products are created, then it probably means that these products aren't being created in the backend of Magento, but by some sort of script that explicitly sets the url_path
attribute of products. I would advise you to find how this happens and disable this and only use the url_key
attribute in the future and make sure the values of the url_path
attribute of products gets removed.
Please make sure to test these changes very well before executing this on production of course 🙂
I hope this helps!
from magento2-module-url-data-integrity-checker.
Got that problem and indexing didn't run correctly. Some products disappeared in categories. Randomly.
Solution :
Search your url_path attribute in eav_attribute table.
Find all the lines with it in your catalog_product_entity_varchar table.
Delete all entries with this attribute.
Hope this helps...
from magento2-module-url-data-integrity-checker.
I think the article you recommended will be really helpful. I wasn't quite sure about the concept of url_path, but as I read through this post, I'm starting to grasp it better. Thank you.
from magento2-module-url-data-integrity-checker.
Closing, because of no feedback and not really a problem.
from magento2-module-url-data-integrity-checker.
All products have been automatically uploaded using the script below.
I have only stored the url_key attribute as below, and I'm not sure what the url_path attribute is as it seems unfamiliar to me.
from magento2-module-url-data-integrity-checker.
You can just delete the values for the product attribute url_path
in your database, that should solve the things the report mentions. It's probably some left over from a Magento 1 to Magento 2 migration.
Just be aware that your url rewrites might generate differently after doing so, it will now use the url_key
instead of the url_path
to generate url rewrites for products (which should be a good thing, since that's what you want).
from magento2-module-url-data-integrity-checker.
That's strange. There are two instances of the url_path and url_key attributes in the database.
I have never migrated from Magento 1 to 2, and I have never set up Magento 1. I started with Magento 2.
from magento2-module-url-data-integrity-checker.
It's not strange, because both products & categories have a url_path
and url_key
attribute.
Also, you shouldn't delete the attribute itself, but the attribute values for the url_path
attribute of the product entities, which are stored in the catalog_product_entity_varchar
db table.
See here for an SQL query to delete them (I wouldn't hardcode the entity_type_id
to '4' though, in most cases it will be 4, but maybe in specific cases it might be something else)
If you didn't start from M1, then I have no idea where those url_path
entries for products came from, that is indeed strange 🙂
from magento2-module-url-data-integrity-checker.
Ahh, so the entity_type_code distinguishes whether it's a category or a product, right?
That's why there are two of them for each.
In the catalog_product_entity_varchar table, are you saying should delete the url_path?
In Magento 1, It used url_path, but in Magento 2, It should only use url_key, is that correct?
from magento2-module-url-data-integrity-checker.
I originally started configuring Magento 2 in single-store mode. However, I later switched to multi-store mode and encountered some issues related to store codes. I vaguely remember that there was an issue where product changes were not reflecting, and after struggling for a few days, I found out that some data from the single-store mode was still present, causing the problem with data not being displayed. It's possible that the url_path might be related to the data from the single-store mode. 😁
from magento2-module-url-data-integrity-checker.
Related Issues (20)
- Pagers in admin grids on Magento 2.4.0 no longer work properly
- Issue Data Integrity - Product Url Key HOT 4
- Killed Integrity Urlkey process in console HOT 7
- Detect url_key's which aren't normalized HOT 8
- Call to undefined method on all backend views / incompatible with firecheckout HOT 5
- magento/framework exception on grids HOT 3
- CLI commands do not work on Magento 2.4.1 HOT 3
- An unexpected exception occured: 'We are already refreshing the product url key's, just have a little patience HOT 1
- Feature request: Check url rewrites of disabled products pointing to non existing categories
- Can't find category with id / We are already refreshing the category url key's, just have a little patience 🙂 HOT 10
- Ignore Not Visible Products HOT 7
- Memory exhausted HOT 2
- Area code is already set HOT 3
- catalog:product:integrity:urlkey shows false positives HOT 5
- file not found HOT 5
- Are url_path really needed currently? HOT 2
- Support for PHP 8.2 HOT 2
- Regarding, product url path.. HOT 1
- Detect missing url_path's of categories on a certain storeview
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-module-url-data-integrity-checker.