Tried to create Rule Action with same machine name as Rule. Got error message, and deleted the duplicate Rule Action.

Now when loading a View with a VBO, the View does not appear and this error message appears:
Fatal error: Call to a member function parameterInfo() on a non-object in /sites/all/modules/views_bulk_operations/plugins/operation_types/rules_component.inc on line 50

Flushed cache, did not fix problem.

Comments

itserich’s picture

Title: Error When Duplicate Machine Name Used » Error When Duplicate Machine Name Used - SOLVED

Solved - by deleting Bulk Operations field from the View and adding the field back to the View.

itserich’s picture

Status: Active » Closed (works as designed)
girishmuraly’s picture

Status: Closed (works as designed) » Active

I ran into the same problem and did the workaround suggested by @itserich at #1 which solved the problem. In doing so, I noticed the following change (removals) to my view, which suggests that there is a possible backward compatibility issue with the Rules component:

   $handler->display->display_options['fields']['views_bulk_operations']['hide_alter_empty'] = 0;
   $handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10';
   $handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array(
-    'rules_component::rules_add_terms_to_node' => array(
-      'selected' => 0,
-      'use_queue' => 0,
-      'skip_confirmation' => 0,
-      'override_label' => 0,
-      'label' => '',
-    ),
-    'rules_component::rules_set_primary_category' => array(
-      'selected' => 0,
-      'use_queue' => 0,
-      'skip_confirmation' => 0,
-      'override_label' => 0,
-      'label' => '',
-    ),
     'action::node_assign_owner_action' => array(
       'selected' => 0,
       'use_queue' => 0,
@@ -261,13 +247,6 @@
       'override_label' => 0,
       'label' => '',
     ),
-    'rules_component::rules_del_terms_from_node' => array(
-      'selected' => 1,
-      'use_queue' => 0,
-      'skip_confirmation' => 0,
-      'override_label' => 0,
-      'label' => '',
-    ),
     'action::node_save_action' => array(
       'selected' => 0,
       'use_queue' => 0,

Reopening just in case we miss this potential backward compatibility issue.

bojanz’s picture

I don't understand what the potential backward compatibility issue is? Is anything not working?

girishmuraly’s picture

Its a weird case and I not sure where the error lies. Also the reproduceable steps are a bit vague as this was discovered by accident by another developer working with the same view while testing it. The steps are something like:

* Before upgrade to 3.0-rc1, there was a VBO view created that used rules components in 3.0-beta3
* After upgrade, edited the view to remove those components along with other changes to make way for the upgraded features of inbuilt actions of editing fields for content types.
* Re-exported view and saved into feature. Noticed that the rules components did not get removed in the export.
* View did not work (blank screened) with error:

Fatal error: Call to a member function parameterInfo() on a non-object in /sites/all/modules/views_bulk_operations/plugins/operation_types/rules_component.inc on line 50

* Deleted the Bulk operations field, re-added it and re-exported the view. This time it works.
* On the second import, the removal of rules components were noticed, as in #2

Like I said I'm not sure where the problem is, but did not want a bug to creep in if at all.

bojanz’s picture

Title: Error When Duplicate Machine Name Used - SOLVED » VBO fails when trying to load selected rules components that have been deleted from the system
Category: support » bug

Okay, that helped, I understand the problem now.

If a component is still enabled in VBO, and gets deleted, VBO chokes and dies because it's trying to load a component that no longer exists.
Looks like you failed to save the view when you disabled the component in VBO (or there was a problem with features, wrong view - possibly overriden - being loaded, etc), hence running into this bug (it doesn't appear for components that have been disabled in VBO field settings prior to deletion).

Note that just disabling a component in VBO does not remove it from the export, it just flips its "selected" variable.

bojanz’s picture

girishmuraly’s picture

Thanks @bojanz.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nicodv’s picture

Thanks @itserich, I was about to get worried :P

nico