You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially the :notempty: keyword only works when the field is virgin.
Once you have added a block to the field and then saved and then return later to remove all blocks, the :notempty: keyword no longer works and entries will still appear even if they have no blocks.
{% setevents=craft.entries.section('whatsOn').eventSuites(':notempty:').all() %}
<h1>Show events which have suites</h1>
{% foreventinevents %}
{{ event.title }}<br />
{{ event.eventSuites|length }}<br />
{% endfor %}
<h1>Show events which do not have suites</h1>
{% setevents=craft.entries.section('whatsOn').eventSuites(':empty:').all() %}
{% foreventinevents %}
{{ event.title }}<br />
{{ event.eventSuites|length }}<br />
{% endfor %}
Additional info
Craft version: 3.1.23
PHP version: 7.2
Database driver & version:
Plugins & versions:
The text was updated successfully, but these errors were encountered:
Description
Essentially the
:notempty:
keyword only works when the field is virgin.Once you have added a block to the field and then saved and then return later to remove all blocks, the
:notempty:
keyword no longer works and entries will still appear even if they have no blocks.Additional info
The text was updated successfully, but these errors were encountered: