« MODX Parse Error » MODX encountered the following error while attempting to parse the requested resource: « Empty $from parameters in DBAPI::select(). » Basic info REQUEST_URI : http://www.domain.it/area-utente/form-inserzione.html Resource : [96]Inserisci Ditta Traslochi Current Snippet : PubKit Referer : http://www.domain.it/area-utente/form-inserzione.html User Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36 IP : 94.39.3.160 Benchmarks MySQL : 0.0098 s (63 Requests) PHP : 0.0625 s Total : 0.0723 s Memory : 3.4278793335 mb Backtrace 1 DocumentParser->executeParser() index.php on line 144 2 DocumentParser->prepareResponse() manager/includes/document.parser.class.inc.php on line 1598 3 DocumentParser->outputContent() manager/includes/document.parser.class.inc.php on line 1699 4 DocumentParser->parseDocumentSource() manager/includes/document.parser.class.inc.php on line 591 5 DocumentParser->evalSnippets() manager/includes/document.parser.class.inc.php on line 1480 6 DocumentParser->_get_snip_result() manager/includes/document.parser.class.inc.php on line 1079 7 DocumentParser->evalSnippet() manager/includes/document.parser.class.inc.php on line 1166 8 eval() manager/includes/document.parser.class.inc.php on line 1027 9 require_once() manager/includes/document.parser.class.inc.php(1027) : eval()'d code on line 223 10 resetRank() assets/snippets/pubKit/pubKit.inc.php on line 233 11 DBAPI->select() assets/snippets/pubKit/pubKit.functions.php on line 103
$next = $modx->db->select('@rank');
$next = $modx->db->select('@rank', 'DUAL');
<?php $user = $modx->getLoginUserName(); if ($user) { return $user; } else { } ?>
<input type="text" class="medium" name="author" id="author" value="[[Username]]" readonly>
The message appears to be due to a change in MODX 1.0.13. In earlier versions, the statement
$next = $modx->db->select('@rank');
on line 103 of pubKit.functions.php would have come back as false because no table is given as the "from" parameter; now it exits with the error message "Empty $from parameters in DBAPI::select()."
....So you could try commenting out the line, and setting "return false;" or just "return;" at the end of the function.