Currently, new values (created by any kind of aggregation) are rendered in render_new_value()
(or render_new_webform_value()
) by trying to duplicate the normal functionality of the field handler without using it. Necessarily, this mimicking of the field handler can never be perfect, especially when a module like Views Numeric Extras is used which provides additional options compared to the standard handler.
Of course, since the values in a row of aggregated values can be entirely different from those in a normal row, using the field handler (or the complete field settings) often doesn't make sense. However, I think it would be a great improvement to at least have the option to do this.
This might also provide a solution for issues like #2459411: Count column aggregation ignores empty option.
Comment | File | Size | Author |
---|---|---|---|
#6 | New VAP option.png | 172.12 KB | RdeBoer |
#2 | 2459875-2--optionally_use_field_handler_for_rendering.patch | 2.96 KB | drunken monkey |
Comments
Comment #1
drunken monkeySee the attached patch which would add exactly such an option.
Comment #2
drunken monkeyRe-roll without the whitespace changes.
Comment #3
RdeBoerHi Thomas,
Thank you for your report and the research that went into it.
So, in summary, to make Views Numeric Extras work for you, or rather your sponsor, we both know where this is coming from :-), you need me to change Views Aggregator Plus?
Views Aggregator Plus: 3300+ installs
Views Numeric Extras: 6 installs, seeking maintainer
It's almost a case of the tail wagging the dog isn't it?
But no worries, it is a very elegant patch that is low risk because of the checkbox you put in. Thanks.
And what you say about the wider benefits that it may have is true also -- well done.
So I'll apply it.
You get the $$$ and I get the bug reports :-)
Rik
Comment #4
RdeBoerOk, so couple of issues with the patch, one good, one not so good.
First, the tickbox actually works nicely on Group aggregation too. So I made it a general option, rather than a Column aggregation option.
Second, unfortunately the patch causes a WSOD on fields originating from Entities. I had to disallow the checkbox for a number of Views fields types (Entity field, PHP and Math Expression), due to the special nature in which these fields deal with (new) values.
Having said that, I thank you again for your research and initial patch @drunken monkey. It certainly helped pushing me in the right direction.
Comment #6
RdeBoerComment #7
NWOM CreditAttribution: NWOM commentedThis patch appears to have been implemented.