Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
node data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2010 at 19:25 UTC
Updated:
14 Apr 2010 at 16:38 UTC
I have a set of nodes with CCK fields of type integer.
When a field contains the value zero it is not displayed. The views options "Hide if empty" and "Count the number 0 as empty" have NOT been selected.
If I enter a text in the "Empty text" field, this text is displayed when my CCK field contains a zero.
So, when the CCK field contains a zero, it behaves as if the field is empty, even though this option to do so has not been selected.
I want to display a - when a field is empty and a 0 when the field contains a zero.
In the issues list I see similar messages, but I think this one is different. Do I overlook something? Is this a bug? Is there a work around?
Comments
Comment #1
sphopkins commentedDuplicate of #546586: 0 not considered valid alternate or empty text and I am having someone look to see if they can fix it.
Comment #2
merlinofchaos commentedIt sounds like this is actually different from that one, which is about arguments.
Comment #3
sphopkins commentedIf that is the case then #559102: Views thinks that a 0 value is empty even when the box 'Count the number 0 as empty' is unchecked... has been marked as a duplicate and closed when it should not have as this is the issue that was in that issue. I assume that these are all related.
In an analysis of the situation I have been able to get "0 " (zero-space) to display a zero in a text field when it was not displaying before. Integer fields have not been fixed yet.
Comment #4
Goofy2k commentedI had a look at #559102: Views thinks that a 0 value is empty even when the box 'Count the number 0 as empty' is unchecked... and my issue indeed looks similar to that one. So I agree with sphopkins #3 that this issue was considered a duplicate erroneously.
Work-arounds mentioned in #559102 are not OK for me. I definitely want users to recognize empty fields. I do not want the system to show a zero when the field is empty.
Comment #5
sphopkins commentedAgreed. My issue started out just like Goofy2k's and was redirected into this issue.
Comment #6
sphopkins commentedI have marked this as a duplicate of #559102: Views thinks that a 0 value is empty even when the box 'Count the number 0 as empty' is unchecked... and I have summarized the work we have done there.