Magento 2.0.2 – Backend CMS Pages and Blocks Disappeared

magento2

After deleting a store my cms and static block pages have become unviewable under admin. Instead I'm left with the error below. I tried to reindex and delete any cache files I could find even though I'm sure this is a db problem. Just not sure how to approach it, any help would be appreciated.

Notice: Undefined index: store_id in
/var/www/html/magento2/vendor/magento/module-store/Ui/Component/Listing/Column/Store.php
on line 82

Best Answer

There is a table that match cms_pages and stores (cms_page_store), to find any relation error you can make a Left Join to determine if some page isn't assigned to any store:

SELECT cp.page_id, cp.identifier, cps.store_id FROM cms_page AS cp
LEFT JOIN cms_page_store as cps on cps.page_id = cp.page_id

If you see some page without store like here:

enter image description here

Just add a new record to cms_page_store for that/those page/s. with value = 0 (admin)

Related Topic