Hello,
I have migrated my portal from D6 to D7. I was not getting any problem till now I tried correcting some views setting which hasn't migrated properly due to field's name changed due to version change.
Now when ever I am trying to do some thing like..creating node or editing view, this particular error is coming and I don't know what to do with this -
Fatal error: Call to a member function get_option() on a non-object in C:\LocalServer\xampp\htdocs\connect\sites\all\modules\views\includes\view.inc on line 2481
The function which it's denoting is like -
/**
* Get an array of items for the current display.
*/
function get_items($type, $display_id = NULL) {
$this->set_display($display_id);
if (!isset($display_id)) {
$display_id = $this->current_display;
}
// Get info about the types so we can get the right data.
$types = views_object_types();
return $this->display[$display_id]->handler->get_option($types[$type]['plural']);
}
Can any body help me out with this ?
Thanks,
Comment | File | Size | Author |
---|---|---|---|
#13 | views-fix-breaking-get-option-on-non-object-1788818-13.patch | 566 bytes | ethomas08 |
Comments
Comment #1
geogaddi CreditAttribution: geogaddi commentedI had this exact error as well - drupal 6 to 7 migration, some fields and content types seemed to not make it over completely. Any attempt to edit content types that were afflicted caused this error to output, same with attempts to create new content of the same type.
My only work around was to basically create a copy of the content type and go through the fields one by one to find the offending field causing the problem and create a new instance of it. Messy stuff.
Comment #2
rajeevkI am also thinking to do the same...but I will loose all the view setting for that which are so many...
Thanks
Comment #3
rajeevkEven if I do make copy of same content type...how I will transfer the migrated content to that content type to include all in views and OG for further use ?
I am finding much trouble with these...help me if you can ...
Comment #4
geogaddi CreditAttribution: geogaddi commentedIt depends on what your views are doing with the data. In my case it was simply a "profile" content type I had to recreate. I just called it "profile 2" using virtually the same fields as "profile" had. In my views I simply filtered for content of type "profile" as well as "profile 2" so that the old profile content and new would be included.
Comment #5
BrightBoldSame problem, also a D6 -> D7 migration, but I could edit the affected content type on August 9. Something happened in between then and last week, but I can't figure out what it might have been.
Here's the call stack if that helps anyone:
Comment #6
BrightBoldUpdate: OK, it was the node reference field that was causing the problem. On August 9 that field had not yet been migrated, which is why I could successfully edit the content originally. When I look at the Migrate Fields page (
/admin/structure/content_migrate
), it shows the following errors for the node reference field:I had already manually created the References display, but I had failed to update the field settings for the field to point to the references display (which I could only do by clicking on "Node reference" under Manage Fields — clicking "edit" got me the same error as above.
Taking these steps resolved the problem, and was a lot less work than recreating the content type. Hope this helps other people. (I'm going to take the liberty of marking this fixed, but if anyone can't resolve this by fixing problems reported on the Migrate Fields page, by all means, reopen it.)
Comment #7
rajeevkNice to know that you have solved it..
May I know the steps you have taken to resolve this error and make your migrated portal work ?
It would be nice if I also get it done..
Thanks
Comment #8
BrightBoldI thought I described the steps pretty well above.
/admin/structure/content_migrate
) and found which fields that appeared on the problematic content type had errors.See if you can replicate those steps on your site and let us know if it solves the problem.
Comment #9
foxtrotcharlie CreditAttribution: foxtrotcharlie commentedThanks @BrightBold - your solution worked for me, much appreciated :-)
Comment #11
drupalerocant CreditAttribution: drupalerocant commentedThanks very much!
It worked for us too!
Comment #12
Mchraiet CreditAttribution: Mchraiet commentedIn case it might help someone,
I disabled the Views Data Export module(contrib) and I didn't have the fatal error again.
Comment #13
ethomas08 CreditAttribution: ethomas08 commentedCreated a patch needed by my team for this issue - a complication is we discovered this while executing a term merge using the taxonomy manager.
Error was: "Fatal error: Call to a member function get_option() on a non-object in sites/all/modules/views/includes/view.inc"
line 2574