Closed (won't fix)
Project:
Rules
Version:
7.x-2.2
Component:
Rules Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 14:46 UTC
Updated:
8 Sep 2018 at 07:34 UTC
Jump to comment: Most recent
Comments
Comment #0.0
Cebra commentedRemoved spelling errors
Comment #1
tr commentedI don't see how we can do that within Rules, not without a lot of work. This is because we use the Entity API to make the query. The function entity_property_query() takes $limit as an argument, and $limit defaults to 30. entity_property_query() then passes that $limit on to entity_metadata_table_query() as a mandatory argument - no default value provided. Then with entity_metadata_table_query() the query range() is set to range(0, $limit). There will ALWAYS be a range set because of this. The only way to force the range to be not set is for the first argument to range() be NULL, but since it's hardwired to 0 in the Entity API a range will always be used and $limit has to be a non-negative number.
So there's no way to just not pass the $limit, even if we had a checkbox, and there's no way to prevent the query from having a range. That's a failure of the Entity API and needs to be fixed there. This Rules condition is behaving exactly as designed, and the Entity API doesn't let us change that short of copying the Entity API code into Rules and modifying it. That's too extreme at this late stage of the D7 development cycle. As a workaround you can set $limit to a very large number.
Note that this DOES work in Drupal 8 - leaving $limit blank in D8 results in all entities being returned.