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