1

After updating, all products on the front end give a 404 when trying to view. All the small views, search, categories etc. work fine and show the products. It's only when you try to visit the page.

The same on the back end - all products are visible but if you try to open one you get the error: This product doesn't exist.

Side note: when trying to reindex using PHP 7.0 the following error shows for search:

Notice: Undefined offset: 4 in /vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/Full.php on line 384

If we switch to PHP 7.1 it reindexes fine.

No errors are showing in any logs and all the products in 'catalog_product_entity' have their SKUs.

Tried installation on 2.2.6 and same thing.

Currently in developer mode and using duplicate db and content from live site but on a subdomain.

Also using MariaDB.

Have tried reindexing and clearing all caches.

/* Update */

Doing some more digging if I try to open a URL_rewrite (Marketing > URL Rewrites > Edit) I am getting this error:

1 exception(s): Exception #0 (Exception): Notice: Undefined index: media_type in /vendor/magento/module-product-video/Model/Plugin/Catalog/Product/Gallery/ReadHandler.php on line 60

0

when ever 404 error that means system is unable to find the path. Basic reason of this error is incorrect naming conventions or incorrect file names.

Check names of all files...is your flow sequence is right.

  • That makes sense but for the product to also be inaccessible in the back end? I can't see anything out of the ordinary that would stop the process of going from a product that is clearly there to a missing link. I don't even know where to start looking for the missed connection. – Justin Feb 19 at 13:55
  • The best way to start is from checking backward first html page name then its layout file name then block and controller name......when ever i face this error my first thing is to check names of files cuse it is caused by naming convention.... – Asad Ullah Feb 19 at 16:54
0

After lots of file checking it turns out the issue was with PHP 7.0 and 7.1.

In this instance we were changing to PHP 7.1 in cPanel and it turns out the server was running multi-php. So we needed to set the PHP version in more than one location.

While we 'thought' the reindexing was working, it was only half working and not showing an error. Once we properly switched to 7.1 it reindexed correctly.

The issue was with the re_writes not indexing correctly.

So if you're coming up with similar issues as we have, I recommend making 100% sure you've completely switched to PHP 7.1

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.