Hi all,
today I've run into some strange error when using selectors. The following selector works fine:
$pages->find('template=TemplateName, (many|of|different|fields*=Searching), (year=Searching), (year>=1941, year<=1960), author*=unknown, publisher*="two, maybe three words"|unknown|"another two, maybe three words", area*=All');
Whereas this one throws an error:
$pages->find('template=TemplateName, (many|of|different|fields*=Searching), (year=Searching), (year>=1941, year<=1960), author*=unknown, publisher*="two, maybe three words"|unknown, area*=All');
The only difference is in publisher field having only two values. The error is Exception: Unknown Selector operator: '' -- was your selector value properly escaped?
Additional info:
ProcessWire 3.0.62
All values are sanitized using $sanitizer->selectorValue(string)
publisher value usually has commas or parenthesis
publisher="one, two"|"three, four" works
publisher="one, two"|three|"four, five" works
publisher="one, two"|five doesn't work
publisher=five works
The only conclusion I can make is the selector fails when the last value of publisher is a single word. Any thoughts?
All help is greatly appreciated!
Jan