Jump to content

Can't add new CMS pages


Recommended Posts

I need help, please!

 

My system is 1.6, I am able to edit already existed CMS pages (comes with the system).

But I am unable to add NEW CMS pages...clicking the button "add" it gives the message [ INVALID SECURITY TOKEN]! I chose [I understand the risks and I really want to display this page] but I got directed to the CMS categories page, still unable to add any new CMS page!

 

 

 

Please help me how to solve this issue! Thanks in advance!!

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...

Hello,

 

I have exactly the same issue, and this is really bad, because I need to have a lot CMS pages. Just moved from Magento, and see that prestashop has too much bugs...


what is your actual ps version ?

do you see id_token in address bar ?

Yes, I can see token in the address bar. 

Link to comment
Share on other sites

  • 1 month later...

I have the same problem. But I dont understand the solution, where do I find this ?

controllers/admin/AdminCmsCategoriesController.php

 

Can someone just guide me to where i can change the code?

 

Did you resolve this?

 

If not you need to edit the file AdminCmsCategoriesController.php this is located in your site directory under your top level directory/controllers/admin

 

The github page shows the red line to be replaced with the content of the green line.

  • Like 1
Link to comment
Share on other sites

Funny thing is...when I tried this and clicked on the "+" button over the table I got the error message too...Then i saw another button on top which says "Add CMS Page"....Clicked on that and it worked without an error!

 

I know its lame and I really have no idea of how that happened, but it did!

Link to comment
Share on other sites

Did you resolve this?

 

If not you need to edit the file AdminCmsCategoriesController.php this is located in your site directory under your top level directory/controllers/admin

 

The github page shows the red line to be replaced with the content of the green line.

hi

 

can you explain to me where's the directory/controllers/admin ?!

 

thank you

Link to comment
Share on other sites

There is a way how to overcome the issue. There is another button to add a CMS page on the top right corner of the page. Good luck.

 you are saying there is no way i can add a new cms page under home?! really?!

 

cause i erased "about us" by mistake..... what do i do now? is there any other way i can add the "about us" 

Link to comment
Share on other sites

hi

 

can you explain to me where's the directory/controllers/admin ?!

 

thank you

 

I think I did already, but maybe I'm making an assumption.

 

You need FTP access to our site, once you have that you need an editor (notepad will do, or another HTML editor)  to open the file AdminCmsCategoriesController.php held in the directory /controllers/admin

 

you cant edit the source code for this type of file through the back office to my knowledge

Edited by sepulchre (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Thanks for pointing out the solution sulpuchre! Fixed the problem for me on 1.6.0.9, although it still gave me the invalid security token message. Despite that I was still able to proceed with creation of the CMS page.

Link to comment
Share on other sites

  • 2 weeks later...

 you are saying there is no way i can add a new cms page under home?! really?!

 

cause i erased "about us" by mistake..... what do i do now? is there any other way i can add the "about us" 

 

Did you manage to get this fixed. I've fixed it a few times and would be glad to help. PM me.

Link to comment
Share on other sites

  • 1 month later...

Thank you, Vekia.

 

BTW could give me a hint how to solve my problem with CMS page link. I posted it here:

www.prestashop.com/forums/topic/396717-link-to-cms-page-in-permanent-links-block-of-page-header/?hl=%2Bcms#entry1935641

 

I followed very clear instruction from:

http://www.templatemonster.com/help/prestashop-1-5-x-how-to-manage-footer-and-header-links.html

 

but it doesn't work on my official website.

It works on my TEST website version on the same server where I tried.

 

Thank you.

Link to comment
Share on other sites

  • 4 weeks later...

Ok, so I can't add and can't edit existing pages, from out of the blue. Tried the syntax for indexation both in ps_cms and ps_cms_lang, didn't work, then tried to clear all types of cache, still didn't work.

 

I even tried to put the content manually from DB, and still wouldn't work.

 

The information inside DB seems to be correct, but the one displaying on the site, not.

 

I am oficially losing it, trying to solve this mistery. I haven't been installing any modules, or doing mods to any files, except CSS, so why is this happening all of the sudden?

Edited by Alex Nitu (see edit history)
Link to comment
Share on other sites

  • 3 months later...

PrestaShop 1.6.0.8, same problem here.

 

I've truncated every ps_cms_* table.

 

I can create only 1 cms page which gets id=0, but when I try to edit this article I'm redirected to creating a new cms page. When I try to access that CMS page from front-end I get 404.

When I try to add new pages it says: Successful update but new article is gone.

 

EDIT: I've made it work - don't know why but id column in ps_cms table wasn't set to auto increment.

Edited by Hasher (see edit history)
Link to comment
Share on other sites

  • 1 year later...

No need to make any modifications on files.

 

Go to modules.

Search for CMS.

Click "configure" on  "CMS block"

 

You will see "LEFT BLOCKS" on top. click "Edit"

Tick and choose your new CMS page.

 

And "save".

 

That all you need to do. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...