Hi,
Is there some tool or setting to write into a log file
from where a chunk or snippet call was done ?
I have a strange problem with a chunk that diplays and should not. This occured after I imported a remote database.
Strangely, the remote site does not displays that chunk, which itself comes from a past version of my site. The local site database was created with no table and the database from the remote site was then imported into it. The site cache was cleared as well as the browser cache. I also checked the database tables and the template which is imported from a file. All seems OK.
The problem is that I have several chunks embedded into each other.
This makes parts of my site sometimes hard to debug and some "log" mode to list from where chunk / snippets calls were done would be very useful.
perhaps a little bit usefull for loging the document_output on all parser-levels:
new plugin with:
$modx->logEvent(1,1,$modx->documentOutput);
or
$modx->logEvent(1,1,htmlspecialchars($modx->documentOutput));
and check onParseDocument
Thanks Bruno. I’ll keep this in my "tips" library.
Meanwhile, I could find what is going wrong: the local MODx site retrieves documents content from the wrong database. The problem is the following:
1) local "MySite" database with alpha developments
2) remote "MySite" database (older version of the website)
3) Trying to get copy of remote site in a "MySite2010" database.
Exported remote "MySite" database.
Imported it into "MySite2010" database, which was empty.
4) The "MySite2010" MODx site reads document contents from the local "MySite" database instead of the "MySite2010" database.
I assume this is because I copied assets and manager folder from the local "MySite".
Probably is a wrong database connexion settings in some config file of manager folder...
-
☆ A M B ☆
- 24,524 Posts
Your database access settings are in manager/includes/config.inc.php