magento2: 404 no-route on all pages added from CMS
Anytime I add a new CMS page from the admin dashboard, it Magento generates a no-route 404 page not found error. After days of meticulous troubleshooting across multiple installs and versions of Magento 2.x.x, I’ve discovered a one way to get the pages to load.
After creating the page and saving it from cms/page/new. I have to go back to /cms/page/index, select layout, assign a new layout (like changing from 2 columns with right bar, to 1 column), and Save. Then select Action > View. Only after following that specific sequence will any CMS page load.
I’ve tested this in both developer and production modes. Currently tested this on Magento v2.1.10-rc2, Ubuntu 14.04, Nginx, and PHP 7.0.6.
Preconditions
Magento v2.1.10-rc2, Ubuntu 14.04, Nginx, and PHP 7.0.6.
Steps to reproduce
- Install Magento from
develop
branch on a Ubuntu 14.04 LEMP stack. - Add a new page from the CMS …cms/page/new…
- Enter content, page title, layout, etc.
- Save and view.
Expected result
- Load the page
Actual result
- Magento no-route 404 Page Not Found.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 12
- Comments: 40 (5 by maintainers)
Commits related to this issue
- Merge pull request #5008 from magento-tsg/2.3-develop-pr90 [TSG] Fixes for 2.3 (pr90) (2.3-develop) — committed to magento/magento2 by zakdma 5 years ago
4 months later, this is still open. ~ I solved this and many other bugs by switching back to magento 1
This worked for our 2.1 CE installation.
Okay more info. This is only happening in single store mode for me. Disabling single store mode forces you to define the relationship by selecting a view when adding a new page (all store views, default store view, etc). Therefore it updates the
cms_page_store
table fine.Is this supposed to happen in single store mode? Or am I missing a setting somewhere?
Went to fix this today and found the issue is resolved in the develop branch upstream. CMS is now using it’s repository to save too. Fingers crossed for this being closed on next release then!
I have the same issue. Earlier CMS pages are working fine but now if i create a new CMS page then it gives 404. I check in the database. New page is in cms_page table but link with cms_page_store. How to solve this?
I made an alternative solution for this
Experiencing the same issue here. Visiting cms/page/view/page_id/{page_id} also doesn’t work so it’s not a rewrite problem.
A little bit of digging around shows that the new page somehow is only added to the
cms_page
table but notcms_page_store
which means it doesn’t belong to any store so it won’t load. If I manually add the relationship incms_page_store
and refresh the page cache, the page loads.So…is it Magento at fault here or is it my setup?
(2.0.1-rc3, ubuntu 14.04, nginx, and php 7.0.7)
Reopen the ticket same issue is verified in mage 2.2.1 on a single store, don’t save any block
Same problem experienced here! Magento 2.1.3 A nice workaround for people who want to stay in single store mode.
having same issue of being able to save pages edits. get 404 when pasting in large bits of content but will save if I break it up into smaller bits. same content…just split up. 404 on frontend for the url. Magento 2.1.0 single store mode. the admin 404 was due to a mod security setting on the nexcess host. still trying to figure out the frontend 404.