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.
Comment | File | Size | Author |
---|---|---|---|
views_plugin_style.inc_.patch | 131 bytes | pendashteh | |
Comments
Comment #1
pendashteh CreditAttribution: pendashteh commentedComment #2
dawehnerThanks 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.
Comment #3
pendashteh CreditAttribution: pendashteh commentedHi 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 beNULL
and thus the$group_content
for contents with no term associated with them would beNULL
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?Comment #4
dawehnerYou could create another drupal installation and install views via a git clone. Then you have all the stuff to be able create patches easy.