Jump to content

[SOLVED] admin cms page blank : token error ?


mantoweb

Recommended Posts

Hi everyone,

 

Just changed the code by this fix bug on github for "invalid security token error messages"

https://github.com/PrestaShop/PrestaShop/commit/84eaa4f9cbb773dc481f3cf84f63db1a7d253827

 

After I deleted cache in my browser ( Chrome ), I can't add cms pages anymore.

A blank page shows up.

 

/admin3565/index.php?controller=AdminCmsContent&token=fb46f088614add821844456f2db13e86

 

Any ideas how to fix this ?

Where are the tokens stored in the database ?

 

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

Hi Vekia,

 

Just turned on error reporting ( local site )....nothing however, just a blank page.

In the log this message :

ID Medewerker Beveiliging (1-4) Bericht Onderwerp type Onderwerp ID Foutcode Datum 1 info%40manto.be.jpg 1 CMSCategory toevoeging CMSCategory 2 0x 0 2014-09-03 20:47:06

 

Errorcode 0x 0 when I tried to add a category to CMS.

any clues ?

Link to comment
Share on other sites

Hi Vekia

 

The php error log showed the php parse error

PHP Parse error:  syntax error, unexpected 'href' (T_STRING), expecting ')' in ....\controllers\admin\AdminCmsController.php on line 246

A " ' " sign was the culprit. After I removed the extra character, the page showed up again !

Thx for pointing out where to look.

 

@reflectiveoffice : perhaps you should check your php error log also

Edited by mantoweb (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

I just correct this changing the line 247 from \controllers\admin\AdminCmsController.php  from:
'href' => self::$currentIndex.'&add'.$this->table.'&id_cms_category='.(int)$this->id_cms_category.'&token='.$this->token,

 to

'href' => self::$currentIndex.'&add'.$this->table.'&id_cms_category='.(int)$this->id_cms_category.'&token='.$this->token,

 

I guess the problem was in "&"... work for me

Link to comment
Share on other sites

×
×
  • Create New...