Hi all,
I just updated to the latest views version - 6.x-2.8
I encountered a problem related to this issue - http://drupal.org/node/621782 - and performed a fix there.
After that, I checked thru the views and saw that the Taxonomy:All terms field was showing just 1 character.
Anyone else encounter this problem after upgrading to latest views?
My setup is:
Apache 2
PHP 5
Mysql 5
Views 6.x-2.8
Taxonomy 6.14
following is an export of a view with a "taxonomy:all terms" field
$view = new view;
$view->name = 'nodes';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'tid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'type' => 'separator',
'separator' => ', ',
'link_to_taxonomy' => 0,
'limit' => 1,
'vids' => array(
'17' => 17,
'15' => 0,
'6' => 0,
'7' => 0,
'11' => 0,
'12' => 0,
'13' => 0,
'26' => 0,
'14' => 0,
'24' => 0,
'22' => 0,
'27' => 0,
'71' => 0,
'16' => 0,
'20' => 0,
'23' => 0,
'3' => 0,
'8' => 0,
'21' => 0,
'10' => 0,
'25' => 0,
'19' => 0,
'72' => 0,
'28' => 0,
'70' => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_date_value' => array(
'order' => 'DESC',
'delta' => -1,
'id' => 'field_date_value',
'table' => 'node_data_field_date',
'field' => 'field_date_value',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'eventpublic' => 'eventpublic',
'flyer' => 'flyer',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
Comments
Comment #1
h3000 commentedIs this a problem with views or is it a problem with taxonomy?
It was working before upgrading from views 6.x-2.6 -> views 6.x-2.8.
Comment #2
merlinofchaos commentedA quick test of TAxonomy: All Terms on my system is working correctly, so I'm not sure what could be going on.
Comment #3
h3000 commentedHi merlinofchaos,
take note that I made changes to the advanced_render function to fix the fatal error problems that were coming up after upgrading to latest views - http://drupal.org/node/621782
so this is how the advanced_render function looks like (in the views_handler_field.inc file)
these are sample values of $item and $this->options['alter'] variables in the advanced_render function - in views where the Taxonomy:All Terms field is used:
$item = "Live Music" - seems to be a string - what format should this value be?
$this->options['alter'] = Array
(
[alter_text] => 0
[text] =>
[make_link] => 0
[path] =>
[alt] =>
[link_class] =>
[prefix] =>
[suffix] =>
[target] =>
[trim] => 0
[max_length] =>
[word_boundary] => 1
[ellipsis] => 1
[strip_tags] => 0
[html] => 0
[help] =>
)
Thanks
btw the PHP version is 5.2.6 is that a factor?
Comment #4
merlinofchaos commentedDoes removing the patch fix the problem?
If yes, then this shoudl be posted as test results on that patch, rather than as a separate issue.
Comment #5
h3000 commentedNo - the change was needed because it was causing the site to come up as blank pages.
I have also posted the results on that thread - but no response as of now.
What format does the render_text() method need? because it seems after running this line:
the result is just the first letter of the taxonomy term.
Comment #6
merlinofchaos commentedWell, I guess what I"m getting at is I'd like to confirm one way or the other whether that patch is at fault or if it is not. If it is not at fault then it doesn't matter and we have to look at something else; and if it is at fault then we mark this a duplicate of that issue.
If that patch is not at fault, we don't want to talk about it on that issue because it will just confuse things for everybody. You're in a position to remove the patch, test, re-add the patch, test, and see if the behavior changes. None of the rest of us are, since we're not getting that behavior.
Comment #7
h3000 commentednot sure how to proceed here because if I remove the patch, the errors come up again and the site comes up as empty pages
however, I have tried changing the part where the $items variable is being added to into this:
and the terms are now appearing complete - but I suspect the render_text() method is needed for something - so this could affect another part of the view
Comment #8
dasjoi have the same issue since upgrading from views 2.6 to 2.8 as h3000 describes in #3
Comment #9
mr.baileysI'm running into the same issue after upgrading from 2.6 to 2.8. I'm happy to help troubleshooting, although I might need some pointers...
In my opinion, both issues (#621782: Fatal Error - Unsupported Operand Type - ...handlers/views_handler_field.inc - line 1061 and this one) are related.
The first issue fails since the individual items returned by
$this->get_items($values)inviews_handler_field::advanced_render($values)are strings while the function seems to expect an array.In this issue, the function
views_hander_field_term_node_tid::render_itemalso seems to expect $item to be an array, with $item['name'] being the name of the term. However, $item currently is a string (the term name), and for some reason $item['name'] returns the first character of that string.So if $item is populated with an array with 'name' as a key, both issues would automatically be resolved.
Disclaimer: my knowledge of Views internals is not as good as I wish it was, so I might be missing something obvious here.
Comment #10
merlinofchaos commentedOk, it appears from reading http://drupal.org/node/621782 that the patch in that issue is indeed the cause of this problem, so marking this duplicate.