Jump to content

SOLVED CMS Pages return 500 error


Recommended Posts

hi everyone,

I have a new installation of Prestashop 1.6.1.20 we are adding products and fixing the back end and found this problem; as we are based on the EU, we need to add the check box at check out I agree to the terms of service....., the tick box works however when you click on the link "read the terms of service" the pop up gives a message

The requested content cannot be loaded.
Please try again later.

I went into the module Advanced Eu Compliance and and enables the revocation option in the disclaimer and now the tick box reads

I agree to the 

However if you click on any of the two links you get a 500 server error.  Actually all CMS pages now return a 500 error.  If I disable the terms of revocation then it will display only the read the terms and conditions and the top error will pop up again.  But both ways any of the CMS pages return a 500 error page.

 From the back office, if you click save and preview on any of the CMS pages, I get a blank page, the url is correct but nothing is displayed on the page.

 

Please can someone help me with this because without this we can take the site online.

 

Thank you

 

Problem solved

 

< if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms, $this->cms->link_rewrite, $this->ssl))) {
---
> if (Validate::isLoadedObject($this->cms) && ($canonicalURL = str_replace('http','https',$this->context->link->getCMSLink($this->cms)))), $this->cms->link_rewrite, $this->ssl))) {


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

  • 3 weeks later...

hi Jonathan

 

This was not an official response.  Basically what we did was to compare the file on our store with the file on a new fresh installation and found that there was a difference in the two files.  Once we changed the above everything worked properly again.  I am not use if editing the EU compliance settings affected this file or not but this was how we fixed the problem.

The file that was affected was:  controllers/front/CmsController.php

Hope this was helpful. 

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

firstly I am not an expert, I use this forum for help as well so I can only tell you what I believe might be a problem.  Today I needed to make some changes to a file on a module which was basic text and even though I changed the file the text did not appear on the front end.  What I needed to do is:

Check you Prestashop optimization settings, clear cache, set to compile always, switch back when everything is ok

this fixed the problem and it appeared correctly on front end.

I hope this helps

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...