Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.16
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2012 at 13:29 UTC
Updated:
25 Aug 2017 at 10:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tigszero commentedI have this problem too after updating to Views 2.16.
Comment #2
tigszero commentedI've found that in the field configuration page, the 'Do not rewrite if empty' is checked by default. Not sure if the option was there before; or if it was, if it was checked by default before. Unchecking it solves the problem for my case. (In fact, I edited line 173 of views_handler_field.inc, changing TRUE to FALSE.)
What happened with my site are:
(1) If checked by default, non-rewritten 'zero' integer becomes blank. ('Count the number 0 as empty' formerly unchecked)
(2) If unchecked by default, any rewritten empty content is not hidden. ('Hide if empty' formerly checked)
If the option has just been introduced, I think leaving it checked by default is better. The bug seems to be that a 'zero'-integer field content is treated as empty even though 'Count the number 0 as empty' is unchecked. I don't know much PHP. Do you think this bug has something to do with $this->original_value and line 534 of views_handler_field.inc?
Comment #3
tigszero commentedRelated node: http://drupal.org/node/1433596
Comment #4
David Lesieur commentedLooks like a duplicate of #1433596: "Hide rewriting if empty" always thinks zero is empty to me.
Comment #5
David Lesieur commented... or maybe not. The original post did not mention if rewriting was involved.
Comment #6
jebbench commentedNo rewriting involved.
If somebody is willing to port the patch from #1433596 to the 6.x-2.x branch I'm quite happy to apply it and see if helps.
Comment #7
barry_fisher commentedI had this issue showing up in views-6.x-2.16. I've attached a port of the patch in #1433596
I've tested this and it works in my case. However I haven't patched any of the tests to this version, so can only say that it worked for me by manual testing/observing. Some of the logic is slightly different to the ported version so improvements welcome!
Comment #8
mustanggb commented