Fatal error: Call to a member function get_plugin() on a non-object on upgrade

seanr - August 20, 2009 - 18:40
Project:DraggableViews
Version:6.x-3.2-beta6
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

The latest update clearly doesn't handle upgrades properly. Your install file should be updating the view settings to prevent crap like this:

Fatal error: Call to a member function get_plugin() on a non-object in /var/www/html/patersonforny.com/html/sites/all/modules/draggableviews/draggableviews.module on line 142

The only solution is to physically delete the module. Ugh.

#1

seanr - August 20, 2009 - 18:41

This was from beta5 to beta6 BTW.

#2

seanr - August 20, 2009 - 19:00

Even after removing the module, changing the views to use a different style plugin and then redownloading and enabling the module, I still get the error. All of my modules (views, cck, etc.) are completely up to date. As soon as I enable this module, it hoses my site.

#3

sevi - August 20, 2009 - 21:29

I'm shocked.
Unfortunately I cannot reproduce this error message. It seems as if a display handler is broken.
Try the attached patch to find out what's wrong. It will output an error message for the broken view/display.

Greetings,
sevi

AttachmentSize
draggableviews-555034.patch 449 bytes

#4

seanr - August 25, 2009 - 16:01

Mind redoing that as a unified diff? (cvs diff -up > example.patch)

#5

sevi - August 25, 2009 - 17:03

Oh. Oups, sure.

Greetings,
sevi

PS: Just to be sure the BETA7-version checks for a valid handler object (like this patch does).
But this patch provides additional debug output.

AttachmentSize
draggableviews-555034.patch 1.01 KB

#6

seanr - August 25, 2009 - 19:23

beta7 fixes the fatal error. Your patch returns the following output:

error => View news, display panel_pane_1 is broken.
error => View videos, display panel_pane_1 is broken.
error => View press, display panel_pane_1 is broken.
error => View events, display panel_pane_1 is broken.

All but videos are default views defined by the ngpcampaign module, though I think they've all been tweaked a bit.

#7

sevi - August 26, 2009 - 15:34

All but videos are default views defined by the ngpcampaign module, though I think they've all been tweaked a bit.

..but not by DraggableViews, I suppose. This module doesn't change other views on its own.

I installed the ngpcampaign module. I haven't spent much time for this but I couldn't notice any problems. Probably there's another module tweaking your views..?

Greetings,
sevi

#8

seanr - August 26, 2009 - 15:52

I meant that I had tweaked the views myself after the module defined them (you can edit module-defined views).

#9

seanr - August 26, 2009 - 15:54

Here's the video view export, if that helps any:

<?php
$view
= new view;
$view->name = 'videos';
$view->description = 'Videos';
$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(
 
'field_video_embed' => array(
   
'label' => '',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'strip_tags' => 0,
     
'html' => 0,
    ),
   
'link_to_node' => 0,
   
'label_type' => 'none',
   
'format' => 'default',
   
'multiple' => array(
     
'group' => TRUE,
     
'multiple_number' => '',
     
'multiple_from' => '',
     
'multiple_reversed' => FALSE,
    ),
   
'exclude' => 0,
   
'id' => 'field_video_embed',
   
'table' => 'node_data_field_video',
   
'field' => 'field_video_embed',
   
'override' => array(
     
'button' => 'Override',
    ),
   
'relationship' => 'none',
  ),
 
'view_node' => array(
   
'label' => '',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'strip_tags' => 0,
     
'html' => 0,
    ),
   
'text' => 'Comments',
   
'exclude' => 0,
   
'id' => 'view_node',
   
'table' => 'node',
   
'field' => 'view_node',
   
'override' => array(
     
'button' => 'Override',
    ),
   
'relationship' => 'none',
  ),
 
'edit_node' => array(
   
'label' => '',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'strip_tags' => 0,
     
'html' => 0,
    ),
   
'text' => '',
   
'exclude' => 0,
   
'id' => 'edit_node',
   
'table' => 'node',
   
'field' => 'edit_node',
   
'override' => array(
     
'button' => 'Override',
    ),
   
'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
 
'status' => array(
   
'operator' => '=',
   
'value' => '1',
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'id' => 'status',
   
'table' => 'node',
   
'field' => 'status',
   
'relationship' => 'none',
  ),
 
'type' => array(
   
'operator' => 'in',
   
'value' => array(
     
'video' => 'video',
    ),
   
'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',
));
$handler->override_option('title', 'Video of the Week');
$handler->override_option('header', '<p>Here is the Governor Paterson 2010 video clip of the week. Check back often for weekly updates, or <a href="http://www.youtube.com/patersonforny">visit our YouTube page</a> to see more footage of the Governor. Feel free to post comments or other feedback below.</p>');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 0);
$handler->override_option('items_per_page', 1);
$handler->override_option('use_pager', 'mini');
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'videos');
$handler->override_option('menu', array(
 
'type' => 'normal',
 
'title' => 'Videos',
 
'description' => '',
 
'weight' => '0',
 
'name' => 'primary-links',
));
$handler->override_option('tab_options', array(
 
'type' => 'none',
 
'title' => 'Press Releases',
 
'description' => '',
 
'weight' => 0,
));
$handler = $view->new_display('panel_pane', 'Panel pane', 'panel_pane_1');
?>

#10

sevi - September 15, 2009 - 22:12
Status:active» closed

Concerned code has been removed due to some theme-related refactoring (see #541130: Theme registery issues).

Your error should be gone too. The development snapshot contains the changes.

Setting status to "closed",
greetings,
sevi

 
 

Drupal is a registered trademark of Dries Buytaert.