I'm creating a View that provides an argument summary based on a CCK field. I do not want the "" entry to appear in the summary for nodes that have no value for the field, so I checked the "Do not display items with no value in summary" in the argument. However, the "" item still appears. It is like this option is being totally disregarded.

I have tried clearing the Views cache. Also, I have duplicated the View, but created a summary based on taxonomy term rather than a CCK field, and the same thing happens (though it displays "Uncategorized" instead of "", of course). I have also disabled all other modules that extend Views. So I'm pretty sure the problem is not with CCK or any other module incompatibility, but rather with Views itself.

I'm including the preview query and the exported View in a comment below.

CommentFileSizeAuthor
#13 views_no-value-in-summary.txt15.06 KBFeG

Comments

theunraveler’s picture

SELECT node_data_field_scripture_book.field_scripture_book_value AS node_data_field_scripture_book_field_scripture_book_value,
COUNT(node.nid) AS num_records
FROM drup_node node 
LEFT JOIN drup_content_field_speaker node_data_field_speaker ON node.vid = node_data_field_speaker.vid
LEFT JOIN drup_node node_node_data_field_speaker ON node_data_field_speaker.field_speaker_nid = node_node_data_field_speaker.nid
INNER JOIN drup_content_field_scripture_book node_data_field_scripture_book ON node.vid = node_data_field_scripture_book.vid
WHERE (node.status <> 0) AND (node.type in ('sermon'))
GROUP BY node_data_field_scripture_book_field_scripture_book_value
ORDER BY node_data_field_scripture_book_field_scripture_book_value ASC
theunraveler’s picture

I'm having trouble getting the exported View to appear correctly, so here's a link to it in a pastebin.

http://drupal.pastebin.com/f260f42e5

merlinofchaos’s picture

Status: Active » Closed (won't fix)

AS per the submission guidelines, this should be filed against CCK (or the module that provides the CCK field if it's not a core CCK field).

theunraveler’s picture

Status: Closed (won't fix) » Active

I did read the submission guidelines. This, however, seems like it is not a CCK issue, since the same thing is happening with a view based on taxonomy term. The part of the view that is based on a CCK field is at line 1058 of the pastebin, and the one based on taxonomy term is at line 817. If you still think that it's a CCK issue, I'll gladly move the issue to their queue.

theunraveler’s picture

Here's the preview query for the taxonomy-based argument:

SELECT term_node.tid AS term_node_tid,
term_data.name AS term_data_name,
COUNT(node.nid) AS num_records
FROM drup_node node 
LEFT JOIN drup_content_field_speaker node_data_field_speaker ON node.vid = node_data_field_speaker.vid
LEFT JOIN drup_node node_node_data_field_speaker ON node_data_field_speaker.field_speaker_nid = node_node_data_field_speaker.nid
LEFT JOIN drup_term_node term_node ON node.vid = term_node.vid
LEFT JOIN drup_term_data term_data ON term_node.tid = term_data.tid
WHERE (node.status <> 0) AND (node.type in ('sermon')) AND (term_data.vid in ('7'))
GROUP BY term_data_name, term_node_tid
ORDER BY term_data_name ASC

and here is the one for the CCK-based argument:

SELECT node_data_field_scripture_book.field_scripture_book_value AS node_data_field_scripture_book_field_scripture_book_value,
COUNT(node.nid) AS num_records
FROM drup_node node 
LEFT JOIN drup_content_field_speaker node_data_field_speaker ON node.vid = node_data_field_speaker.vid
LEFT JOIN drup_node node_node_data_field_speaker ON node_data_field_speaker.field_speaker_nid = node_node_data_field_speaker.nid
INNER JOIN drup_content_field_scripture_book node_data_field_scripture_book ON node.vid = node_data_field_scripture_book.vid
WHERE (node.status <> 0) AND (node.type in ('sermon'))
GROUP BY node_data_field_scripture_book_field_scripture_book_value
ORDER BY node_data_field_scripture_book_field_scripture_book_value ASC

Hope that helps.

adpo’s picture

Subscribing the same problem. Do not display items with no value in summary is turned off.
I want change existing view from:

Argument 1 (3)
Argument 2 (5)

to

Argument 1 (3)
Argument 2 (5)
Argument 3 (0)

Letharion’s picture

Status: Active » Fixed

This bug report is made against a very old version of Views.
If this is still a problem, please test against the latest.
If the problem persists, then please re-open the bug, and we will take a look at it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

FeG’s picture

Version: 6.x-2.6 » 7.x-3.0-rc1
Status: Closed (fixed) » Active

I currently have the same problem in version 7.x-3.0-rc1 with the summary of taxonomy terms in a view: Allthough I selected "Do not display items with no value in summary", the item "Uncategorized" shows up.

This must have been introduced in this version, since in an earlier 7.x version (don't know exactly which one), the view worked fine.

Not tested in 7.x-3.x-dev.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please provide a view export which allows to reproduce the problem? This really really helps to fix the issue.

kars-t’s picture

Status: Postponed (maintainer needs more info) » Fixed
Issue tags: +dvcs11

Closing this due to long inactivity. Feel free to reopen the issue and provide more information.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

FeG’s picture

Version: 7.x-3.0-rc1 » 7.x-3.1
StatusFileSize
new15.06 KB

As the problem still remains in version 7.x-3.1, I attached the exported view where it occurs. The affected display is "Page (Tags)" where the name of the taxonomy terms shall be displayed as summarized links. On the page using this view, all tag names occur but also the link "Uncategorized", although "Do not display items with no value in summary" is checked in the settings of the according contextual filter.

kars-t’s picture

Status: Closed (fixed) » Active

Don't forget to reopen the issue ;)

clevername’s picture

Seems this option has been removed with the most recent version of Views. My solution was to simply create a filter to weed out any content that had an empty CCK value for the contextual filter. May not work for taxonomy terms and tags though.

FeG’s picture

I finally "solved" the problem by using the contextual filter "Content: Has taxonomy term ID" instead of the combination of contextfilter "Content: Tag" and relationship "Taxonomy terms on node". With the "Has tax. term ID", the setting "Do not display items with no value in summary" (which still exists in the version Views version 7.x-3.3 I use) seems to work properly.

So maybe this was a weird problem due to the combination I used. I'm not sure whether this is worthy to be examined further.

Nevertheless, thanks for your responses.

kars-t’s picture

Status: Active » Fixed

The last comment from FeG seems like we can close this :)

Status: Fixed » Closed (fixed)
Issue tags: -dvcs11

Automatically closed -- issue fixed for 2 weeks with no activity.