I'm having an issue where I'm trying to output an integer CCK field in an ATOM feed. However, if the value of the field is '0', the field gets omitted altogether for the given entry.
Here's a patch that seems to address that.
However, it doesn't resolve a separate but related issue: If you check "hide if empty" but leave unchecked the option "count 0 as empty", the '0' values still get omitted. That issue may require a more thorough patch.
This patch is taken against the latest 6.x-1.x dev version and may not be complete in that the other view styles (defined in views_rdf.module, views_json.module, views_xhtml.module, etc) may be using the same logic in their treatment of "empty" values and how they are defined by the view.
Comment | File | Size | Author |
---|---|---|---|
views_xml.module.diff | 950 bytes | ankur |
Comments
Comment #1
allisterbeharry CreditAttribution: allisterbeharry commentedThanks for the patch, I think the general case has to do with the way the module gets info about each field from Views, and unhandled cases when 'exclude' may be selected for empty fields but this test is modified by certain other field options. This will be fixed in the next release.
Comment #2
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedsubscribing
Comment #3
kenorb CreditAttribution: kenorb commented