Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
18 Apr 2014 at 13:54 UTC
Updated:
9 Mar 2022 at 12:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Anonymous (not verified) commentedComment #3
dawehnerThank you for the patch.
Moving to DEV as everything else is kinda pointless :) I wonder whether you could also write a patch.
StyleTableTest already has some tests which you can probably extend.
Comment #4
Anonymous (not verified) commentedI'd love to but I haven't written one yet so I'd leave that to someone who knows what he's doing.
Comment #5
jhedstromThis adds a test that illustrates the bug, and the fix from above.
I also added a beta phase evaluation.
Comment #12
jhedstromThose xpath tests were passing locally. I've updated them to be a bit more verbose to see if that makes the testbot happy.
Comment #15
jhedstromOk. This time, GREEN!
Comment #16
jhedstromComment #18
jhedstromI marked #2171497: Table fields with the integer value zero are not displayed. as a duplicate. Both had a patch, the tests here also test the 'treat 0 as empty' option though.
Comment #19
dawehnerJust curios, don't we have to take "empty_zero" on the field settings into account here?
Comment #20
jhedstromHmm, the test I added covers 'empty zero'. I think the reason the code in #19 doesn't need to worry about the 'empty zero' setting is that just below, there is a
empty()check. The full code:Comment #21
lendudePatch in #15 needed a reroll. This is that reroll.
Looks good to go to me though.
On 'empty zero': isn't that handled by the field handler? It is in Drupal\views\Plugin\views\field\Numeric anyway. So I'd say this level of the theme layer doesn't need to worry about it, let the field handler worry about it.
Comment #24
lendudeNot surprisingly, this doesn't apply anymore.
Comment #25
lendudeSomebody redid all the work in #2543132: Zero value not shown in views table style.