Coder Social home page Coder Social logo

Can't find category with id / We are already refreshing the category url key's, just have a little patience 🙂 about magento2-module-url-data-integrity-checker HOT 10 CLOSED

baldwin-agency avatar baldwin-agency commented on June 19, 2024
Can't find category with id / We are already refreshing the category url key's, just have a little patience 🙂

from magento2-module-url-data-integrity-checker.

Comments (10)

hostep avatar hostep commented on June 19, 2024 2

Release v1.3.1 was made which contains some small improvements based on what you reported here, thanks for that! 🙂

from magento2-module-url-data-integrity-checker.

hostep avatar hostep commented on June 19, 2024 1

I took a look at the code again, I believe you might have a category where the path contains the '36764' id.
You can probably find the incorrect categories with a query like this: SELECT * FROM catalog_category_entity WHERE path LIKE '%/36764%';

That probably means those are subcategories of the no-longer existing category with id '36764' and those subcategories will probably not work properly and maybe even not show up in the backend of Magento and can probably be removed as well?

from magento2-module-url-data-integrity-checker.

Nuranto avatar Nuranto commented on June 19, 2024 1

Hello, you're right ! That was it. Everything works fine after deleting those.

I don't know how that could happen....

Anyway, thank you very much for your help !

from magento2-module-url-data-integrity-checker.

hostep avatar hostep commented on June 19, 2024 1

Great, glad you figured it out!

Let me keep this ticket opened, so I remember to take a look at that 2nd problem, where we should remove the flag that something is running after an exception occurred.

from magento2-module-url-data-integrity-checker.

hostep avatar hostep commented on June 19, 2024

Thanks for the report @Nuranto

Let's start with the second problem.
You can pass an extra --force flag in the command to skip that check.
However, I believe you found a bug here, we should probably clear that flag whenever an exception occurs so that the extra --force flag is not needed the next time you want to run the command. The original purpose of the check was to prevent people from running the checker twice at the same time.

As for the first problem, this is a bit harder to figure out, as the code that runs against this problem is a bit complex and it's been a while since I've written it.
Can you tell me if you have multiple root categories? And could you maybe briefly explain how your category trees look like and especially where category with id '36764' fits into the tree? A screenshot might help here if are willing to share it publicly.

from magento2-module-url-data-integrity-checker.

Nuranto avatar Nuranto commented on June 19, 2024

Hello @hostep

Ok thank you for the second problem 👍

For the first one, yes I have two root categories, for two websites. 36764 did not exists in catalog_category_entity table, however, there was an entry in url_rewrite. I deleted it, but it seems it doesn't solve the issue, so I guess 36764 is still in another table, but which one ?

from magento2-module-url-data-integrity-checker.

hostep avatar hostep commented on June 19, 2024

Huh, this is really strange

If I follow the code, the category data is fetched from the database from here, and this does search the catalog_category_entity table.
But since it needs the url_path and url_key attributes, I would suspect that a join is made with the catalog_category_entity_varchar table. So maybe there are still entries in that table with that ID?

If that doesn't help, could you maybe try to debug the code a little bit, to see how and where it goes wrong?

from magento2-module-url-data-integrity-checker.

Nuranto avatar Nuranto commented on June 19, 2024

I did check all entity tables also, there was no 36764 there.

Ok, I will dig this tomorrow ! I'll keep you informed.

from magento2-module-url-data-integrity-checker.

sajidunnar avatar sajidunnar commented on June 19, 2024

@Nuranto Can you share whats was your solution did u removed those records from db ?

from magento2-module-url-data-integrity-checker.

Nuranto avatar Nuranto commented on June 19, 2024

@sajidunnar Yes, I remove duplicated lines, and it solves the issue.

from magento2-module-url-data-integrity-checker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.