I have a view with node.nid with LIMIT 1, but in the other view I use the first as filter it doesn't show any of the nodes from that one.

It seams that Limit is now working and entityreference filter take all of the nodes

Comments

maximpodorov’s picture

As I understood, the limit for view which returns filter options is not applied. This is the standard behavior of entityreference views. Do you have cases which require such limits?

maximpodorov’s picture

Status: Active » Closed (works as designed)
antiorario’s picture

Title: Limit is not working » Allow view filter to respect the limit set by entity reference display
Category: Bug report » Feature request
Status: Closed (works as designed) » Active

I'm reopening this (with a more explanatory title), because I also think that if the entity reference display sets a limit in the number of results, this limit should be respected. In some cases, the results are too many to comfortably fit in a select list (very long select lists are barely usable, especially on mobile devices), and using a limit is a quick way to cut the number of results without adding complex filters to the entity reference display.

It's true that entity reference views tend to fetch all possible results, but not all results are displayed. For example, autocomplete fields show only the top 10 results of a given query—more than that and it would be very impractical to display.

maximpodorov’s picture

This change can break all sites which use this module (since the default limit is 10, and there was no reason to change it). Can you find the way to protect the existing sites?

antiorario’s picture

Perhaps a way not to break existing sites would be to add an option, and if the option is not set nothing happens.

maximpodorov’s picture

Yes, this should be configured on the filter's side. Any patch?

antiorario’s picture

I tried to work on it just in the past few days, with no luck.

pinueve’s picture

i have an ER view with limit of 10 results (wich is not respected, in preview it does), if i set my field with lets say 5 limited values and i set widget to check boxes (wich is my desired setting) i get a time-out error because it loads many many nodes (same error on select list), it "works" if i set my field wigdet to 'autocomplete', i'm not a good php expert, i post this to see if someone with better skills can have a deep look in a function that autocomplete widget do and make a patch to this beaty module to work with check-boxes.

reinaldoc’s picture

anyone interested to be paid for this feature in stable release?