MIGX icon indicating copy to clipboard operation
MIGX copied to clipboard

migxLoopCollection seems to not be compatible with PHP 7.3

Open sonicpunk opened this issue 4 years ago • 1 comments

No errors get written to the MODX log, but using it like this, results in the where statement not properly filtering

$catId = $modx->runSnippet('migxLoopCollection',array( 'prefix' => 'stamisol_', 'packageName' => 'stamisol_files', 'classname' => 'downloadCat', 'tpl' => '@CODE:[[+id]]', 'where' => '[{"name":"'.$cat.'"}]' ));

I am still looking into it

sonicpunk avatar Nov 18 '19 09:11 sonicpunk

I seem to be experiencing this issue today. using MODX 2.8.1 with PHP 7.3 (on MODX Cloud) and MIGX-2.12.0-pl

Using this call

[[!migxLoopCollection?` &packageName=`property_archive` &classname=`property_archive` &where=`{"published":"1"}` &tpl=`propertyArchiveSales`]]

But doesn't render on the front end and no error messages in manager log.

UPDATE

OK have updated my call to the following:

[[migxLoopCollection? &packageName=`property_archive` &classname=`property_archive` &tpl=`propertyArchiveSales` &limit=`6` `&where=`{"published":"1"}`]]

And now works... If I add the &limit it works, without it it doesn't.

crimsonpixel avatar Feb 11 '21 11:02 crimsonpixel