My log is full of the following error related to the getResources snippet:
(ERROR @ /core/cache/includes/elements/modsnippet/5.include.cache.php : 260) PHP warning: strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string
The error occurs in second line of the following block of code:
foreach ($operators as $op => $opSymbol) {
if (strpos($filter, $op, 1) !== false) {
$operator = $op;
$sqlOperator = $opSymbol;
break;
}
}
And here is the code in my script that makes the error happen:
$output = $modx->runSnippet('getResources',array(
'parents' => '22',
'depth' => '1',
'limit' => '0',
'includeTVs' => '1',
'tpl' => 'newsItems',
'sortbyTV' => 'news_date',
'sortdirTV' => 'DESC',
'includeContent' => '1',
'tvFilters' => '||news_section|| LIKE %||'.$id.'||%',
'tvPrefix' => ''
));
The generated output is correct, so all data is being fetched properly.
Revo 2.3.1, getResources 1.6.1-pl
[ed. note: rainbowtiger last edited this post 10 years, 5 months ago.]
I was getting this error. It has now been fixed with the latest version of the gallery module (v1.6.1)
You might try changing &limit to `99999` and/or explicitly setting &offset=`0`.