(Using Ditto 2.0.1 SVN)
I have a Ditto call in the footer of the site. This footer is shown on EVERY page via the following Ditto call:
[!Ditto? &debug=`1` &where=`parent <> 2` &tpl=`footer_tpl` &startID=`0` &depth=`2` &summarize=`all` &showInMenuOnly=`1` &seeThruUnpub=`1` &sortBy=`pagetitle` &sortDir=`ASC`!]
The output/TPL are very simple. Nothing more than your typical footer links at the bottom of a page.
Now, I also have an articles page (with pagination) displaying 50 articles per page... When on Page 2 or higher (anything with ?start=X where X is greater than 0) causes Ditto to display:
No documents found. error. However, on Page 1 of the paginated Ditto results, the footer links are displayed as expected?
Articles page Ditto:
[!Ditto? &debug=`0` &tpl=`article_tpl` &startID=`2` &depth=`1` &summarize=`50` &paginate=`1` &paginateAlwaysShowLinks=`1` &showInMenuOnly=`1` &sortBy=`pagetitle` &sortDir=`ASC` !]
Why does this unrelated Ditto call in my footer get impacted when on paginated results page?
So, I turned on debugging to see what was going on, only I get the following error when I try to open the console:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: Invalid argument supplied for foreach()
Error type/ Nr.: Warning - 2
File: C:\www\sandbox\assets\snippets\ditto\classes\debug.class.inc.php
Line: 135
Line 135 source: foreach ($resource as $item) {
Parser timing
MySQL: 0.1409 s (38 Requests)
PHP: 0.1556 s
Total: 0.2965 s