Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entries fieldtype in select mode should show all results #1727

Closed
jasonvarga opened this issue Apr 23, 2020 · 2 comments
Closed

Entries fieldtype in select mode should show all results #1727

jasonvarga opened this issue Apr 23, 2020 · 2 comments

Comments

@jasonvarga
Copy link
Member

jasonvarga commented Apr 23, 2020

Bug Description

The entries fieldtype (and similar relationship fieldtypes like taxonomy), when using mode: select currently grabs the first paginated page, which is only 15 results. (We should probably bump that up too, but that's another story)

Pagination is fine for the default and typeahead modes.

The select mode should show all results. Even if that means its a ridiculous amount. You should get what you ask for.

How to Reproduce

  • Have more than 15 entries.
  • Add a field to your blueprint:
    fields:
      -
        handle: myfield
        field:
          type: entries
          mode: select
  • See only 15 results

Environment

Statamic version: 3.0.0.-beta.27
PHP version: 7.4

@derekjones
Copy link
Contributor

Just commenting that particularly in the case of Taxonomies, this can cause content creators to accidentally create new taxonomies from a slightly different spelling or phrasing, which leads to poor normalization and poor visitor experience when said taxonomies are a forefront of the front end.

@Krzemo
Copy link

Krzemo commented Sep 16, 2020

So this (for taxonomies on sidebar) seems to be 2 fold:

  1. vendor/statamic/cms/src/Query/Builder.php has defaultPerPageSize() hardcoded to return 15 per page. (quick and ugly fix to show all terms would be to change this value to hight number)
  2. Dropdown RelationshipSelectField component searches only entries returned by QueryBuilder while there should be an API call made to run LIKE '%%' query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants