We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39184
    • 24 Posts
    I can not seem to determine what is causing this error or the if this error is actually effecting anything. I did some searching and one issue was with getResources, which I have updated; however, I have not found anything that works. If anyone has insight on this or some more advanced troubleshooting techniques I am all ears.

    MODX: 2.2.6-pl
    PHP: 5.2.17
    MySQL: 5.5.3
    Server: CentOS 5(Shared Hosting)
      • 35150 ☆ A M B ☆
      • 191 Posts
      I'd start by looking in your templates and chunks for any [[~ ]] tags and making sure you're always giving them a number to work with. If you're using getResources, your tpl chunks probably have something like [[~[[+somePlaceholder]]]] and if somePlaceholder isn't getting set under certain circumstances, that would certainly cause the error you're seeing.

      One thing to keep in mind is that the MODX parser works from the inside out. So if you have something like [[+somePlaceholder:!empty=`[[~[[+somePlaceholder]]]]`]] then [[~[[+somePlaceholder]]]] is going to get evaluated first, whether or not somePlaceholder is empty. If it's empty it won't be output, but it will be evaluated and that'll generate your error.
      This is a good article if you'd like to read more on the subject: https://www.markhamstra.com/modx-blog/2011/11/nested-caching-in-modx-revolution/

      Setting a default value is a good idea in these cases and a nice way of doing that is with chunk properties.
        Extras :: pThumb • Resizer • imageSlim • setPlaceholders