processwire / processwire-issues

ProcessWire issue reports.
44 stars 2 forks source link

"Is not empty" selector for subfield matches pages that do not contain field #1899

Closed Toutouwai closed 6 months ago

Toutouwai commented 6 months ago

Short description of the issue

Demoing here with Lister and FieldtypeEvents but I can reproduce the issue with other fieldtypes that contain subfields so I think it's due to some underlying PageFinder problem.

I have a test_events field on a single template that is used for a single page.

2024-03-22_105341

In Lister if I attempt to match pages where the Title subfield of test_events is not empty then all pages are matched.

2024-03-22_105542

I expected only a single page to be matched, because if a template does not contain the test_events field then how could the subfield be "not empty"?

Setup/Environment

ryancramerdesign commented 6 months ago

Thanks @Toutouwai It looks like the JS in InputfieldSelector was converting it to a !field='' rather than a field!='', I have pushed a fix for that.

Toutouwai commented 6 months ago

Thanks