Closed (fixed)
Project:
Internationalization
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2009 at 12:45 UTC
Updated:
24 Jan 2010 at 10:48 UTC
I have a node that outputs a view. Once I enabled the multilingual option for that node and then tried to see the node i got:
Fatal error: Cannot use object of type views_handler_field_node_link_edit as array in C:\xampp\htdocs\drupal-6.14\sites\all\modules\i18n\i18nviews\i18nviews.module on line 74
The code I use to output the view inside the node is:
$view1 = views_get_view('publications_books');
$view1->set_display('default');
$output_view1 = $view1->preview();
if ($view1->result) {
print $view1->execute_display('default');
}
I tried to comment out the whole section that belongs to i18nviews.module on line 74 and it seems to work.
However, I would like to know if there is any danger in doing this?
Thanks!
Nimi.
Comments
Comment #1
nimi commentedHelp anyone? Please...
Comment #2
nimi commentedSolved it!
i changed the code I used to display a view to:
views_embed_view("publications_articles","publications_block");
Thanks.
Nimi.
Comment #4
rcombes commentedI had the same error but had no clue as to what was precipitating it so I made the following repair...
At line 74, I changed i18nviews.module (/sites/all/modules/i18n/i18nviews) to read...
The addition of is_array just before line 74 provided a check for $data validity as an array and prevented it from throwing an error when it received an inappropriate value.
This unstuck my system even though it didn't really provide much of a clue as to why the $data value managed to go wrong.
Cheers
Roland Combes