Page 1 of 1

[LISE] PHP warning when sorting by custom field

Posted: Tue Nov 24, 2020 9:54 am
by 10010110
I’m using this tag in my content:

Code: Select all

{LISEGremien category='la-jugend-musiziert' summarytemplate='LA JuMu' orderby='custom_sortierung,item_title'}
and I’m getting the following PHP warning:
Warning: count(): Parameter must be an array or an object that implements Countable in ~/modules/LISE/lib/class.LISEItemQuery.php on line 662
I’ve tracked it down to the “custom_sortierung” value of the “orderby” parameter. The field definition is a simple text field. What could be wrong here? Could the issue be that some entries don’t have a value specified in this field?

Re: [LISE] PHP warning when sorting by custom field

Posted: Tue Nov 24, 2020 3:04 pm
by DIGI3
Is the operation failing, or is it working and just logging that warning?

Usually that warning can be ignored, and suppressed on production sites as it's just due to a change in PHP. As far as I know they've been fixed in the latest LISE release, but if it still happens after the next release you should file a BR.

Re: [LISE] PHP warning when sorting by custom field

Posted: Tue Nov 24, 2020 3:45 pm
by 10010110
The strange thing is that it fails in my local environment but it seems to work on staging (and production). It starts working if I remove that parameter value. But it’s kinda hard to work on the site locally if things don’t work there.