Monday, 19 January 2009

MODx "$rs not set! New variable not saved!" Error

After upgrading MySQL on a new server I noticed an issue with MODx not being able to add Template Variables. I managed to find a workaround by setting the sort order to "0" which allowed the new Template Variable (TV) to be saved. The problem wasn't solved though as the TV would not store any content. The solution was to change the MySQL configuration to remove "STRICT_ALL_TABLES" or "STRICT_TRANS_TABLES" from the "sql-mode" in the MySQL ini file.

Monday, 5 January 2009

MODx Ditto Error

Just had this error after I upgraded a site from 0.9.6.2 to 0.9.6.3:

PHP error debug
Error: Missing argument 18 for ditto::determineIDs(), called in \manager\includes\document.parser.class.inc.php(769) : eval()'d code on line 792 and defined
Error type/ Nr.: Warning - 2
File:     \assets\snippets\ditto\classes\ditto.class.inc.php
Line: 571
Line 571 source: function determineIDs($IDs, $IDType, $TVs, $orderBy, $depth, $showPublishedOnly, $seeThruUnpub, $hideFolders, $hidePrivate, $showInMenuOnly, $myWhere, $keywords, $dateSource, $limit, $summarize, $filter, $paginate, $randomize) {

The solution was to overwrite the "assets/snippets/ditto" folder with the version from the previous MODx install. Or the other option would be to update the snippet calls as there must be a change in the new version of ditto.