View list does not find all matches
Permalink Browser Info Environment
By default, the page size is 50 entries. However, if you have more than 50 entries in your list, and you search by category, then if the first matching category is not in the first 50 then no results are returned.
This is happening because the list is not filtering by the attribute, it's pulling in the first 50 results and then filtering those manually.
The same issue occurs when you select the very confusingly name "hide from website" option, which when you're editing the item is labelled as hide from public. This is in fact nothing more than the exclude_page_list attribute which ships as standard with concrete5, so renaming it two different ways is just confusing.
Replacing your manual array search with this:
Has the addon performing as I would expect.
This is happening because the list is not filtering by the attribute, it's pulling in the first 50 results and then filtering those manually.
The same issue occurs when you select the very confusingly name "hide from website" option, which when you're editing the item is labelled as hide from public. This is in fact nothing more than the exclude_page_list attribute which ships as standard with concrete5, so renaming it two different ways is just confusing.
Replacing your manual array search with this:
if ($this->get('category')) $directoryList->filterBySelectAttribute('directory_category',$this->get('category')); if ($this->get('hideWebsite')) $directoryList->filterByAttribute('exclude_page_list',$this->get('hideWebsite'));
Has the addon performing as I would expect.
Type: | Pre-Sale |
---|---|
Status: | Resolved |
Thanks for your insight on this, as well as your other comments. These changes have been implemented in one of our newer add-ons (that's still under PRB review), but we agree that this module needs that same attention.
Thanks again.