Dear maintainers, I have this issue running Drupal 7.7 (latest) locally with Views Slideshow. The same issue with Drupal 7.0.
In order to create a simple news scroll, I created a view showing a block showing the last 5 teasers of a content type "news": I used the plugin of type slideshow (see the exported view).
The block looks fine, and the news are scrolling OK, but if you click on the title of the teaser or on the "read more" link to access the full news, then you got the error with the following stack:
( ! ) Fatal error: [] operator not supported for strings in D:\temp\wamp\www\example.com\includes\common.inc on line 2319
Call Stack
# Time Memory Function Location
1 0.0035 368704 {main}( ) ..\index.php:0
2 0.2582 23566920 menu_execute_active_handler( ) ..\index.php:21
3 0.2663 23610008 drupal_deliver_page( ) ..\menu.inc:518
4 0.2663 23610608 drupal_deliver_html_page( ) ..\common.inc:2437
5 0.2664 23611008 drupal_render_page( ) ..\common.inc:2542
6 0.2677 23672464 block_page_build( ) ..\common.inc:5490
7 0.2761 23730280 block_get_blocks_by_region( ) ..\block.module:268
8 0.2761 23730400 block_list( ) ..\block.module:315
9 0.2761 23730400 _block_render_blocks( ) ..\block.module:658
10 0.2775 23735104 module_invoke( ) ..\block.module:828
11 0.2775 23735536 call_user_func_array ( ) ..\module.inc:795
12 0.2775 23735720 views_block_view( ) ..\module.inc:0
13 0.3780 28397608 view->execute_display( ) ..\views.module:573
14 0.3926 29406480 views_plugin_display_block->execute( ) ..\view.inc:936
15 0.3926 29406512 view->render( ) ..\views_plugin_display_block.inc:48
16 0.4289 30526216 views_plugin_display->render( ) ..\view.inc:873
17 0.4323 30826360 theme( ) ..\views_plugin_display.inc:2242
18 0.4356 31202856 template_preprocess_views_view( ) ..\theme.inc:858
19 0.4356 31202856 views_plugin_style->render( ) ..\theme.inc:45
20 0.4357 31203544 views_plugin_row->render( ) ..\views_plugin_style.inc:233
21 0.4359 31204624 theme( ) ..\views_plugin_row.inc:140
22 0.4361 31206936 template_preprocess_views_view_row_node( ) ..\theme.inc:858
23 0.4373 31214976 drupal_render( ) ..\node.views.inc:685
24 0.4374 31216552 theme( ) ..\common.inc:5627
25 0.4390 31249384 theme_render_template( ) ..\theme.inc:937
26 0.4396 31320608 include( 'D:\temp\wamp\www\example.com\themes\marinelli\templates\node--teaser.tpl.php' ) ..\theme.inc:1247
27 0.4402 31324624 l( ) ..\node--teaser.tpl.php:41
*****************************************************************************
This is the export of the view
$view = new view;
$view->name = 'news_scroll_1';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'news scroll 1';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'news scroll 1';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
$handler->display->display_options['style_plugin'] = 'slideshow';
$handler->display->display_options['row_plugin'] = 'node';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'news' => 'news',
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'news-scroll-1';
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
$translatables['news_scroll_1'] = array(
t('Master'),
t('news scroll 1'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('Page'),
t('Block'),
);
Comment | File | Size | Author |
---|---|---|---|
#16 | 1237020-16.patch | 745 bytes | gaurav.kapoor |
Comments
Comment #2
kibo CreditAttribution: kibo commentedI had the same problem and I changed the critical line 2319 from this:
$options['attributes']['class'][] = 'active';
to this:
$options['attributes']['class'] = 'active';
and it running. but its only hotfix...
Comment #3
tilla23 CreditAttribution: tilla23 commentedI use this, because original class remains (tagedelic module generated this error too):
if(isset($options['attributes']['class'])) $options['attributes']['class'] .= ' active';
else $options['attributes']['class'] = 'active';
Comment #4
Solv CreditAttribution: Solv commentedI have this problem. Thanks kibo for hotfix
Comment #5
ngstigator CreditAttribution: ngstigator commented+1
Comment #6
danieljulia CreditAttribution: danieljulia commentedI had the same problem.
Hotfix working for me too, great!
Comment #7
iamacyborg CreditAttribution: iamacyborg commentedSame problem here. The fix mentioned worked me as well.
Comment #8
redndahead CreditAttribution: redndahead commentedThis seems like it would be a core issue or a views issue. Do you get the same error if you use unformatted instead of slideshow?
Comment #9
ckngDon't hack core. =)
The culprit is marinelli/templates/node--teaser.tpl.php as shown in the stack.
The class attribute passed to l() is not an array.
Change this (Line 41)
to
Comment #10
chinmay.sahoo CreditAttribution: chinmay.sahoo commented+1
Comment #11
Holygoe CreditAttribution: Holygoe commentedHotfix working for me too, thx. I use BlogBuzz 2 theme. Is it can be source of that error?
Comment #12
charlie charles CreditAttribution: charlie charles commentedI got the same error message using omega theme. the hotfix worked or me too
Comment #13
phponwebsites CreditAttribution: phponwebsites commentedI have also same problem. But the hotfox is not a good solution. We need to find where the real problem is raise?
Comment #14
rohithpv23 CreditAttribution: rohithpv23 commentedThe class attribute must be an array. Here is the documentation
Comment #15
epavlov CreditAttribution: epavlov commentedAfter minor update to 7.36 I got this issue on all views pages. Fix in common.inc file still do the magic, but I wonder where it is coming from.
Comment #16
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedComment #17
BhumikaVarshney CreditAttribution: BhumikaVarshney as a volunteer and at OpenSense Labs commentedAfter applying this patch, if you click on the title of the teaser or on the "read more" link to access the full news, then no error stack is there.
Comment #19
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commented