Hi elegato
I had the same problem and found a solution...
open the modx class file
(it can be found under mysite\core\model\modx\modx.class.php)
goto the makeUrl() function (use an text editor, search for `makeUrl(` )
the end of the makeUrl() function looks like:
} else {
$this->log(modX::LOG_LEVEL_ERROR, '`' . $id . '` is not a valid integer and may not be passed to makeUrl()');
}
return $url;
}
use a try..catch to produce a stack trace in the MODx log:
(maybe you want to create a backup of this modx.class.php file before updating it ... your choice)
} else {
$this->log(modX::LOG_LEVEL_ERROR, '`' . $id . '` is not a valid integer and may not be passed to makeUrl()');
/*** print the stack trace to the MODx log ***/
try {
throw new Exception('catch this...');
}
catch (Exception $e) {
$this->log(modX::LOG_LEVEL_ERROR, $e->getTraceAsString());
}
/*********************************************/
}
return $url;
}
save the modification to the MODx class and do whatever it needs to reproduce the error.
open the MODx log. it now contains a stack trace that you can use to track down the error.
do not forget to undo the modification in the modx.class.php after fixing the error.
here’s an example
[2010-11-17 22:30:39] (ERROR @ /index.php) `[[+id]]` is not a valid integer and may not be passed to makeUrl()
[2010-11-17 22:30:39] (ERROR @ /index.php)
#0 <your_site_root>htdocs\core\model\modx\modparser.class.php(955): modX->makeUrl('[[+id]]', '', '', -1)
#1 <your_site_root>htdocs\core\model\modx\modparser.class.php(379): modLinkTag->process(NULL)
#2 <your_site_root>htdocs\core\model\modx\modparser.class.php(165): modParser->processTag(Array, false)
#3 <your_site_root>htdocs\core\model\modx\modchunk.class.php(93): modParser->processElementTags('[[$ysp.login_pa...', '<div class="ysp...', false, false, '[[', ']]', Array, 10)
#4 <your_site_root>htdocs\core\model\modx\modx.class.php(1558): modChunk->process(Array)
#5 <your_site_root>htdocs\core\components\login\model\login\login.class.php(165): modX->getChunk('ysp.login_panel...', Array)
#6 <your_site_root>htdocs\core\cache\elements\modsnippet\2.include.cache.php(289): Login->getChunk('ysp.login_panel...', Array, 'modChunk')
#7 <your_site_root>htdocs\core\model\modx\modscript.class.php(48): elements_modsnippet_2(Array)
#8 <your_site_root>htdocs\core\model\modx\modx.class.php(1528): modScript->process(Array)
#9 <your_site_root>htdocs\core\components\mycp\elements\ysplogin.snippet.php(12): modX->runSnippet('Login', Array)
#10 <your_site_root>htdocs\core\cache\elements\modsnippet\24.include.cache.php(7): include('...')
#11 <your_site_root>htdocs\core\model\modx\modscript.class.php(48): elements_modsnippet_24(Array)
#12 <your_site_root>htdocs\core\model\modx\modparser.class.php(416): modScript->process(NULL)
#13 <your_site_root>htdocs\core\model\modx\modparser.class.php(165): modParser->processTag(Array, true)
#14 <your_site_root>htdocs\core\model\modx\modresponse.class.php(63): modParser->processElementTags('', '<!--? *? * defa...', true, false, '[[', ']]', Array, 10)
#15 <your_site_root>htdocs\core\model\modx\modrequest.class.php(110): modResponse->outputContent(Array)
#16 <your_site_root>htdocs\core\model\modx\modx.class.php(815): modRequest->prepareResponse()
#17 <your_site_root>htdocs\core\model\modx\modx.class.php(852): modX->sendForward('1', Array)
#18 <your_site_root>htdocs\core\model\modx\modrequest.class.php(146): modX->sendErrorPage()
#19 <your_site_root>htdocs\core\model\modx\modrequest.class.php(88): modRequest->getResource('id', 'favicon.ico')
#20 <your_site_root>htdocs\core\model\modx\modx.class.php(1072): modRequest->handleRequest()
#21 <your_site_root>htdocs\index.php(93): modX->handleRequest()
#22 {main}
item #0 contains the bad makeUrl() call that is causing the error.
the next item that processes a custom MODx element is item #3:
modParser->processElementTags('[[$ysp.login_page_form]]', '<d...
in this example, the [[$ysp.login_page_form]] Chunk contains the following code:
...
<form name="login-panel-form" method="post" action="[[~[[+id]]]]">
...
the error is caused by [[~[[+id]]]]. changing it to [[~[[*id]]]] solves the problem.
Good luck!
Ramon
PS: No guarantees for the code at all. DO NOT apply this on production sites...