We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49499
    • 48 Posts
    Ok I have used this snippet hundreds of times without issue and cannot seem to get this to work now. I'm sure that I have missed something obvious, but I don't know where to start. Here is my call:

    [[!migxLoopCollection?
    	&packageName=`endorsements`
    	&classname=`Endorsement`
    	&tpl=`tpl.Endorsement`
    	&where=`{"published":"1"}`
    ]]


    The only thing I could think would be a typo, but I haven't found one. There is definitely a package titled 'endorsements', the classname is definitely 'Endorsement', and the chunk 'tpl.Endorsement' does exist with the following markup:

    <li>
    	<div class="c-endorsement">
    		<p>TEST STRING</p>
    		<p class="c-endorsement__name">[[+name]]</p>
    		<div class="c-endorsement__text">[[+endorsement]]</div>
    	</div>
    </li>


    Steps I have taken:

    • Removed the '&where' property, with the notion that 'published' was irritating the script. Nothing.
    • Added and removed the '&limit' parameter. Nothing.

    Can someone point me in the right direction to troubleshoot this? Thank you!

    This question has been answered by patrickappelman. See the first response.

      • 49499
      • 48 Posts
      Quote from: patrickappelman at Jun 18, 2015, 10:32 AM
      Steps I have taken:

      • Removed the '&where' property, with the notion that 'published' was irritating the script. Nothing.
      • Added and removed the '&limit' parameter. Nothing.

      Adding that I have tried to completely remove the '&tpl' parameter to output an array. Still nothing.
      • discuss.answer
        • 49499
        • 48 Posts
        Ok, stupid move on my part. I can't believe I missed this.

        I am using a custom prefix for my database table and I left off the '&prefix' parameter. The correct call should be:

        [[!migxLoopCollection?
        	&packageName=`endorsements`
        	&classname=`Endorsement`
        	&prefix=`modx_custom_`
        	&tpl=`tpl.Endorsement`
        	&where=`{"published":"1"}`
        ]]
          • 4172
          • 5,888 Posts
          I don't use custom-prefixes any more, because I'm allways forgetting about them.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!