Why some Resources Can't be Saved

Troubleshooting when you can't save a MODX Resource

By Bob Ray  |  September 2, 2025  |  4 min read
Why some Resources Can't be Saved

Every once in a while, you may find that you can't save a resource. Sometimes, you'll get a message, but in other cases, the "Saving" progress bar will never go away. In this article, we'll look at some reasons why that might happen. In addition to resources, some of these issues can also affect saving other MODX objects such as chunks and templates.

Server Issues

If you are on a shared server, the database may be overloaded. If the server connections are maxed out, or if the save times out because so many other people are saving things to a database at the same time, your save may fail. This is a likely cause if the problem is intermittent and happens with many different resources. Usually, you'll see an error message in the MODX error log. It might give you a warning about too many simultaneous connections. Occasionally, you'll get a somewhat poetic message saying, "The server has gone away." You can take this up with your host, but sometimes the best solution is to change hosts or upgrade your hosting package.

Date/Time Issues

This doesn't happen very often, but occasionally a mismatch between the date/time settings in MODX, PHP, or the server can cause save failures. The solution is to make sure those settings are all the same. The server setting can be set in .htaccess or php.ini, and the MODX setting is in the date_timezone System Setting. The SiteCheck premium extra will check them for you, and do a lot of other checks as well.

mod_security

The server addon mod_security is meant to protect your site from various security issues. Some hosts will also use it to prevent you from presenting content that they think is inappropriate. If your host is running mod_security, there are a set of rules that prevent certain content from being saved to the database. These rules can be updated by your host at any time. They may prevent certain kinds of code from being saved, but in some cases they can be arbitrary and very odd. In one case, a MODX user was unable to save any resource containing the word "casino."

The mod_security rules are a likely cause if there is a specific resource, chunk, or template that can't be saved while all others can be saved with no problem.

A good diagnostic technique is to remove the content from the object you're trying to save (be sure to save it somewhere!). If this fixes the problem, it's almost certainly a problem with mod_security. You can put back the content, one paragraph at a time, until it breaks. Then remove pieces of the offending paragraph until you find the specific part that's violating the mod_security rule. Often, you can rewrite the content to avoid to problem, but in some cases, you may have to contact your host and ask them to turn off the rule, or mod_security itself, for the site or for the page.

Permission Issues

If you get an "Access Denied" message when you try to save something, a permission issue is the most likely cause. The current user may have permission to edit the object, but not permission to save it. If you have recently changed the permission settings, this is almost certainly the problem. The Context Access Policy may have a "save" permission unchecked. Another possibility is that a Resource Group or Element Category Access Policy is missing the "save" permission. A quick way to diagnose this it to temporarily make the user a "sudo" user. If that solves the problem, it's definitely an issue with MODX permissions. Don't forget to remove the user's "sudo" status after testing.

TV Problems

This only applies to Resources and it's particularly insidious. If there is a TV that has "Allow Blank" set to No, you can't save the resource unless that TV has a value. If you're looking at the TV tab, you'll see an error message and a red outline around the TV value's input field. Often, however, you won't be looking at the TV tab, and you won't see the message.

Check all the TVs on the TV tab as you try to save to see if you get a notice about an error condition.


Bob Ray is the author of the MODX: The Official Guide and dozens of MODX Extras including QuickEmail, NewsPublisher, SiteCheck, GoRevo, Personalize, EZfaq, MyComponent and many more. His website is Bob’s Guides. It not only includes a plethora of MODX tutorials but there are some really great bread recipes there, as well.