Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error "can't open file" when saving edited theme files
#1
We recently had this issue with all of our GetSimple sites.

If using the GetSimple admin interface to edit the theme files (i.e. template.php, home.php, etc) when the edited file is saved, the message "can't open file" is displayed, and the file is empty.

This happened with both GS 3.3.25 & 3.3.16, various themes and both php 7.0.33 & 7.4.33

I solved this issue, and wanted to post this so that it might help others.

The problem was with the depreciated function get_magic_quotes_gp

The solution is to edit line 57 in the file admim\theme-edit.php, changing the original line:

$FileContents = get_magic_quotes_gpc() ? stripslashes($_POST['content']) : $_POST['content’];

TO:

$FileContents = $_POST['content'];


Paul
Reply


Messages In This Thread
Error "can't open file" when saving edited theme files - by PaulR - 2024-02-21, 10:46:06



Users browsing this thread: 1 Guest(s)