0

I have upgraded an EE 1.6.8 website all the way to the latest EE 5, but now I have a problem with saving templates. When I try to save a template after editing, the homepage shows up and the template is not saved... it's not a redirect to the homepage, because the url still points to system/index.php?/cp/design/template/edit/16&S=c81740cc76a21628dcf01628398632f0

The weird thing is this doesn't happen to any template, some work fine, and there doesn't seem to be any logic in which work and which don't.

Any help is appreciated!

EDIT: When the template contains one of the following strings it refuses to save:

  • <!DOCTYPE
  • <html
  • text/javascript
  • <meta
  • <link href=
  • <?
  • Could it be a file permission issue? Do all the template group directories have the same permissions? – AllInOne Jan 30 '19 at 22:17
0

Sounds a bit if there's an authentication issue. Can you try to set your cp session type to cookies only? abd delete your old EE cookies?

| improve this answer | |
  • I have set the CP session type to Cookies only and deleted all old cookies, but the problem remains.. one thing I forgot to mention is that when I try to save the index in the Default Template Group it doesn't show the homepage but rather I get a warning in Chrome that the page isn't working due to "unusual code" -> [ERR_BLOCKED_BY_XSS_AUDITOR] – Marijn Jan 28 '19 at 21:38
  • can you check what happens if you put $config['disable_csrf_protection'] = 'n'; in your config file? – Jelle Dijkstra Jan 29 '19 at 7:48
  • Thanks for taking the time to help out, Jelle. Unfortunately nothing happens when I put the line in the config file. I did some debugging with new templates and what code it does or doesn't save: when I try to save just <!DOCTYPE it doesn't work, but <!DOCTYP does. So I think it goes wrong when the editor recognizes certain tags.... – Marijn Jan 29 '19 at 9:35
  • that's really odd. first thing is to see if it's browser related. Does this happen only in Chrome? If it happens in other browsers too, it might be addon related. Do you have an addon that uses one of these hooks maybe? docs.expressionengine.com/latest/development/extension_hooks/… Or you could try re uploading the cp themes – Jelle Dijkstra Jan 30 '19 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.