In one of my projects I used Grouping option in table style and I grouped nodes by their two of their taxonomies (a 2-level grouping).
Some of nodes had no term associated with the vocabulary I'd been used for 2nd grouping level and this resulted in a page full of Notices and an incomplete and mis-styled table.
The problem was that the $row['group'] that is checked to see if a row contains other rows inside it, was NULL for those nodes.
The solution is to convert NULL to empty string for such cases. I did that with adding a '' to $row['group'] where it is assigned to make sure it will pass isset($row['group']) later on.

The subject file is plugins/views_plugin_style.inc.

I used diff without --git option to generate the patch. However it's a very simple patch. Regenerate it with --git if needed.

CommentFileSizeAuthor
views_plugin_style.inc_.patch131 bytespendashteh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pendashteh’s picture

Assigned: pendashteh » Unassigned
dawehner’s picture

Status: Needs review » Needs work

Thanks for working on this bug.
Are you sure this is the correct way to fix it? The question is how can a group_content be NULL and not '',
maybe there is some other layer of bugs involved.
In general "just fixing" notices can mean to hide a deeper bug.

Please post a patch in the normal drupal format, so for example the testbot can apply the patch.

pendashteh’s picture

Hi dan,
It's simple. $group_content is not a label; It's the value of another field. In my case this is the term associated to a content and while there is no term associated to that content the value would be NULL and thus the $group_content for contents with no term associated with them would be NULL too. So I don't think there is something else behind it.

And for the path, I simply used path command because in my system path dose not accept --git option. Could you help me to make it work? or pass a link to help?

dawehner’s picture

You could create another drupal installation and install views via a git clone. Then you have all the stuff to be able create patches easy.