Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New CMS Page Not working #5711

Closed
j1nx3d opened this issue Jul 20, 2016 · 17 comments
Closed

New CMS Page Not working #5711

j1nx3d opened this issue Jul 20, 2016 · 17 comments

Comments

@j1nx3d
Copy link

@j1nx3d j1nx3d commented Jul 20, 2016

Steps to reproduce

  1. Install Magento 2.1 from any source.
  2. Set Enable Single-Store Mode to Yes
  3. Create a new CMS Page

Expected result

  1. CMS Page is created
  2. New Page can be accessible from the frontend

Actual result

  1. CMS Page is created
  2. Returns 404 when trying to access the page from the frontend

Issue

On the database the cms_page_store doesn't create the registers when the Single-Store Mode is enable.

@liquidia
Copy link

@liquidia liquidia commented Jul 24, 2016

same issue 2.1/ php7/nginx

@liquidia
Copy link

@liquidia liquidia commented Jul 30, 2016

not just single store with multi store too have same issue.

@magentodevleper
Copy link

@magentodevleper magentodevleper commented Aug 4, 2016

Same Issue here. I had to manually associate value in cms_page_store to get the page working.

@magentodevleper
Copy link

@magentodevleper magentodevleper commented Aug 17, 2016

Steps reproduce

  1. Set Enable Single-Store Mode to Yes
  2. Create a new CMS Page

Expected result

CMS page will saw in frontend

Actual result

CMS page will not display

Review below file

https://github.com/magento/magento2/blob/develop/app/code/Magento/Cms/Model/ResourceModel/Page.php#L152

i have print value of two variable

echo 'field : ' . $field
echo 'value: ' . $value

output :
field : identifier
value : no-route

That means when we create new CMS page in Single store mode identifier not fetch correct.

Solution

Open cms pages list , click on cms page ( grid view pullout that row and ask for ( cancel and save ) , now click on save.

now open you CMS page , its will display....

@AVoskoboinikov AVoskoboinikov self-assigned this Sep 13, 2016
@AVoskoboinikov
Copy link
Contributor

@AVoskoboinikov AVoskoboinikov commented Sep 13, 2016

Hi guys

Can you upgrade to 2.1.1 and recheck if this issue is still actual? I have tried it on 2.1.1 and my page was available by url key from "Search Engine Optimization".

Thanks for contributing!

@plauge
Copy link

@plauge plauge commented Oct 6, 2016

This is still an issue in 2.1.1

@staffrob
Copy link

@staffrob staffrob commented Oct 6, 2016

Can confirm this issue in 2.1.1 also

@plauge
Copy link

@plauge plauge commented Oct 6, 2016

Hi,
Yes and no :-)
Please take a look at this video, where I test it on 2 sites on the same server.
One site is a clean 2.1.1 installation, and one site is an update from 2.0.7 to 2.1.1.
The bug is in the updated version.
The server is running: PHP Version 7.0.11

Here is the video link: https://goo.gl/oRoCeB

@andreasRulle
Copy link

@andreasRulle andreasRulle commented Feb 9, 2017

Hi, the bug still seems to bei present in a fresh Magento 2.1.3 installation. After interserting
(<page_id>, 0) into the cms_page_store table the newly created cms page was usable.

@RishabhRkRai
Copy link

@RishabhRkRai RishabhRkRai commented Feb 16, 2017

Experiencing the same issue here.
After some R&D, i found that the new page somehow is only added to the cms_page table but not cms_page_store. If I manually add the relationship in cms_page_store, the page loads.
This issues is due to "Single Store Mode". If you enable the Single Store Mode, this problem exists. Disable Single Store Mode from Store > Configuration > General > General > Single Store Mode (Select No)
Refresh the cache, create a CMS page. Its work fine.

Hope! This will help you @j1nx3d

@markalston
Copy link

@markalston markalston commented Apr 20, 2017

Still broken in 2.1.5
Manually adding page to cms_page_store table fixes problem.

@bassplayer7
Copy link

@bassplayer7 bassplayer7 commented May 1, 2017

This is still an issue, and one that can easily be resolved (by Magento) I think as there are 3 lines that would need to be changed. The problem is that the page save controller is using the deprecated way to save a model. @magentodevleper is right - saving inline actually works fine. Currently \Magento\Cms\Controller\Adminhtml\Page\Save::execute() loads the model directly, and then saves it directly.

This can easily be fixed by simply using \Magento\Cms\Api\PageRepositoryInterface to load the page model and then save it.

@korostii
Copy link
Contributor

@korostii korostii commented May 4, 2017

@bassplayer7, nice catch!
Here's the relevant piece of code.

The most annoying thing is that if you switch back to the develop branch you'll see that there's already a fix done as early as in October 2016. There's even an internal ticket MAGETWO-58383 created with the sole purpose of backporting that fix to 2.1.

Does it really take half a year to cherry-pick a bunch of commits? The word "embarrassing" comes to mind.

@idlea
Copy link

@idlea idlea commented May 5, 2017

Has this been fixed I have the same problem using Magento ver. 2.1.6
I am in single store mode which if I change to single store-no should fix the problem, however the whole store has been created in single store mode, will change to not single store create any problems.

@idlea
Copy link

@idlea idlea commented May 5, 2017

okay works now without change store mode, reindexed and flushed and works okay.

@oleg-onufer
Copy link
Contributor

@oleg-onufer oleg-onufer commented Jun 19, 2017

Internal ticket was created for this issue -- MAGETWO-69926

@magento-engcom-team
Copy link
Contributor

@magento-engcom-team magento-engcom-team commented Oct 2, 2017

Hi @j1nx3d
Fix for this issue is already released with 2.2.0. You may use commits prefixed with MAGETWO-56863
for reference.
We are considering to backport this fix into previous versions, however there is no specific schedule for now.
Thank you.

slavvka pushed a commit that referenced this issue May 22, 2020
[epam] MC-33884: De-couple Braintree payment method integration from core in 2.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet