Problem/Motivation
The delta option on filters in Views does not work for end dates. Setting "Add multiple value identifier" to "Yes" simply does not do anything.
A few hours of debugging shows that the problem is caused by the way $real_field_name is calculated when setting the id and delta fields on the Views query object. Instead of stripping '_value2' it only strips '_value', thus leaving '2'.
Proposed resolution
The solution is quite simple as per the attached patch.
- $real_field_name = str_replace(array('_value', '_value2'), '', $this->real_field);
+ $real_field_name = str_replace(array('_value2', '_value'), '', $this->real_field);
Remaining tasks
- Apply patch
- ???
- Profit!
Comments
Comment #1
valentine94Bot
Comment #3
valentine94Re-roll.
Comment #4
valentine94Comment #5
andypostComment #6
anpolimusHi, @yosh.
Is it possible to provide us view export for better testing?
Comment #7
anpolimusComment #8
chris matthews commentedThe 4 year old patch in #3 to date_views_argument_handler_simple.inc and date_views_filter_handler_simple.inc still applies cleanly to 7.x-2.x-dev and seems like a reasonable/necessary fix to me.