4

On first try of category pages I am only getting 404 errors.

I have Magento 2.1.5.

I imported about 20000 products in my single store, and the products are available in search.

But now I tried category tree from Codazon Megamenu. All links go to 404. This an example:

I tried several things:

  • magento indexer:reindex
  • magento setup:di:compile
  • cleared var/cache, var/generation, var/pagecache, var/di

Maybe its a problem that I have more than one root category?

Now I don't know what I can do to make it work. Google was my friend but I only found the methods described above.

What can I do?

  • Have you assigned the root category to your store? (stores -> All Stores -> current store) – Haritha Jun 12 '18 at 12:18
  • @tadeus Have you ever resolved this issue ? – Vivek Mar 8 at 9:04
2

Delete all the Products and Category URLs from Database table "url_rewrite" and then trying to save the each category.

Also check for the URL suffix from configuration.

Store > Configuration > Catalog > Catalog > Search Engine Optimization

0

If you are not an advanced user, use one root category. There may be may problems with URL rewrites for many root categories.
More info about it:
Magento 2.1.3 - Import products. Issue with categories

Are you able to go to any category page? Are you sure that Megamenu works fine? Maybe you have to update Megamenu settings e.g.URLs or positions?

  • >> if you are not advanced user, use one root category. <br /> ok, I try to move all with drag&drop to one category <br><br> >> Are you able to go to any category page? <br> no<br><br> >> Are you sure that Megamenu works fine?<br> I think so. The automatic build category tree gave me the URLs like in the first post. The IDs are true. – tadeus Mar 29 '17 at 12:53
  • Ok, try move all categories to one root category and we will check ;) – Konrad Siamro Mar 29 '17 at 13:08
0

You can try this following ways

  • Open database and find core_config_data table. Run below Query into sql

    SELECT * FROMcore_config_dataWHERE path like '%web/seo/use_rewrites%'

Change the value of it 1 to 0.

Now Run the below code in cli

***rm -rf var/cache var/page_cache***
chmod 777 -R var/ pub/static generated/

I think, it will open inner page of your site. Next Step.......

To, remove index.php from URL ,

  • Need to enable mod_rewrite into Apache server.
  • web/seo/use_rewrites value will be 1.
  • Need to work on .htaccess file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.