craftsmancoding / assetmanager

Asset Manager for MODX Revolution
36 stars 15 forks source link

getPageAssets: "$modx->getCount('PageAsset',$c)" returns 0 when "is_image" is set #54

Closed swbraun closed 9 years ago

swbraun commented 9 years ago

modx: 2.3.3-pl assetmanager: 1.1.1-pl php: 5.5.22

When I tried to use "&lastTpl" but it didn't work (the last item was processed by the innerTpl), I checked the code and found out that the line 118:

$cnt = $modx->getCount('PageAsset',$c);

always returns the value "0" when I call getPageAssets with "&is_image" - without is_image set, the count is correct. As a workaround I added as line 121:

$cnt = count($ProductAssets);

dadaniels commented 9 years ago

Thank you, I already applied a fixed for this issue, it will be carried out on the next release.