Skip Navigation

[Resolved] Cannot save custom code snippet

This thread is resolved. Here is a description of the problem and solution.

Problem: I cannot edit a custom code snippet in Toolset > Settings > Custom Code. A message is shown:
"Unforunately, this snippet cannot be edited directly. Check file permissions and wp-config.php constants DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS. Alternatively, you can edit the file manually."
What should I do?

Solution: Check to see if either DISALLOW_FILE_EDIT or DISALLOW_FILE_MODS is set in your wp-config.php file. If so, define those as false. Also check your file permissions on the server to be sure WordPress can write to the /wp-content/toolset-customizations/ directory. If you can't do these, edit the file manually and use FTP to save it on the server.

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by AlimB3245 4 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1642167
custom-code.png

Am attaching a screenshot to show you the error.. Please check the text with the yellow highlight border on the left.. you would notice that I can't add or edit anything in the field...

Regards,
Alim

#1645749

Hi Christian

I haven't received any update on this.. please do advise.

Regards,
Alim

#1646787

Hello, you should check your wp-config.php file to see if either of these options are defined:

define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );

If you see either of these, delete it. If neither is present in your wp-config.php file, you may need to get your server host involved to set file permissions on the /wp-content/toolset-customizations/ directory so that WordPress can edit it. If neither of those are possible, you can edit the file manually and use FTP to push your updates to the server.

#1648319

My issue is resolved now. Thank you!