I get this error whenever I save the configuration file under Tools -> Configuration:
Failed to update setting value!
It seems to save, but it gives that error anyways. How can I fix this?
Here’s my setup:
Web Server: Apache
PHP version and how it’s running (suexec, mod_php, CGI, etc.): 5.2.5, mod_php
Operating System and version: centOS 5
Database:
MySQL 5.0.54
List of any tables over 1MB in size
MODx:
0.9.6.1
Any changes you’ve made: none
Any snippets you’re running on the page that is not working properly: none
Any plugins you’re running: none
Browser/Client:Safari 3
Operating System and version: Mac OSX Leopard
Ok, I tried to find the problem and here’s what I came up with. I found that it gives me that error if a certain query doesn’t execute correctly. I made the code print out the query and here it is:
REPLACE INTO `shuve`.`modx_system_settings` (setting_name, setting_value) VALUES
In the code, it appends implode(",",$savethese) at the end of the string. However, $savethese is 0 so nothing is added making it an invalid query. I don’t know how to fix this, but could this be a bug? Am I the only one experiencing this?
EDIT: After more testing, I found that the $_POST array is empty during that page. Here’s the code:
$savethese = array();
echo count($_POST);
foreach ($_POST as $k => $v) {
switch ($k) {
case ’error_page’:
case ’unauthorized_page’:
if (trim($v) == ’’ || !is_numeric($v)) {
$v = $_POST[’site_start’];
}
break;
case ’lst_custom_contenttype’:
case ’txt_custom_contenttype’:
// Skip these
continue 2;
break;
default:
break;
}
$v = is_array($v) ? implode(",", $v) : $v;
if ($k == ’manager_lang_attribute’ && trim($v) == ’’) $v = ’en’;
$savethese[] = ’(\’’.mysql_escape_string($k).’\’, \’’.mysql_escape_string($v).’\’)’;
}
Since $_POST is empty, none of that code runs so $savethese is also empty.
Ok, I just tried it on Firefox and it works ok. I guess it’s just a Safari thing, but it’d be nice if it was fixed for Safari.
-
☆ A M B ☆
- 24,524 Posts
See
http://modxcms.com/forums/index.php/topic,22399.0/topicseen.html in reference to Safari 3.
I think we’re going to see a lot more problems with Safari as more people upgrade. Maybe an entry in the FAQ would be appropriate.