I was updating to the new dev version of 2012-Jan-25, I get an error message. When going back to 7.x-3.0-beta3 everything is OK. Back to the dev, the error repart.

Notice: Undefined index: table in views_bulk_operations_views_data_alter() (line 10 of /home/ecodev/public_html/sites/all/modules/views_bulk_operations/views/views_bulk_operations.views.inc).
CommentFileSizeAuthor
#10 1418376-fix-notice.patch1.12 KBbojanz

Comments

bojanz’s picture

Can you please open views_bulk_operations.views.inc, and before line 9 add the following code:

if (!isset($data[$info['base table']]['table'])) {
  var_dump($entity_type);
  var_dump($info['base table']);
}

then, run it (clear cache if you can no longer see the error) and paste the output.

Thanks!

jide’s picture

Having the same issue, here is the dump :

string(18) "privatemsg_message"
string(10) "pm_message"
string(10) "rules_link"
string(10) "rules_link"
string(12) "rules_config"
string(12) "rules_config"
jide’s picture

Seems that base table can be different than the entity type, which causes the error.

bojanz’s picture

Well, I'm confused.
Can you alter the pasted code to:

if (!isset($data[$info['base table']]['table'])) {
  var_dump($info['base table']);
  var_dump($data[$info['base table']]);
}

So that we can see what the offending data is. And how recent is your Entity API install? Looks like all these modules rely on Entity API for Views integration, but in that code I don't see anything wrong...

jide’s picture

I had entity_api rc1, just updated to latest dev and the issue is still here.
Here is the new dump :

string(10) "pm_message"
array(2) {
  ["og_rel"]=>
  array(4) {
    ["group"]=>
    string(8) "OG group"
    ["title"]=>
    string(24) "OG group from Privatemsg"
    ["help"]=>
    string(51) "The OG group associated with the Privatemsg entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(18) "privatemsg_message"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(37) "privatemsg_message being the OG group"
      ["base"]=>
      string(2) "og"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(3) "mid"
    }
  }
  ["og_membership_rel"]=>
  array(4) {
    ["group"]=>
    string(13) "OG membership"
    ["title"]=>
    string(29) "OG membership from Privatemsg"
    ["help"]=>
    string(56) "The OG membership associated with the Privatemsg entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(18) "privatemsg_message"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(37) "OG membership from privatemsg_message"
      ["base"]=>
      string(13) "og_membership"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(3) "mid"
    }
  }
}
string(10) "rules_link"
array(2) {
  ["og_rel"]=>
  array(4) {
    ["group"]=>
    string(8) "OG group"
    ["title"]=>
    string(24) "OG group from Rules Link"
    ["help"]=>
    string(51) "The OG group associated with the Rules Link entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(10) "rules_link"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(29) "rules_link being the OG group"
      ["base"]=>
      string(2) "og"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(2) "id"
    }
  }
  ["og_membership_rel"]=>
  array(4) {
    ["group"]=>
    string(13) "OG membership"
    ["title"]=>
    string(29) "OG membership from Rules Link"
    ["help"]=>
    string(56) "The OG membership associated with the Rules Link entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(10) "rules_link"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(29) "OG membership from rules_link"
      ["base"]=>
      string(13) "og_membership"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(2) "id"
    }
  }
}
string(12) "rules_config"
array(2) {
  ["og_rel"]=>
  array(4) {
    ["group"]=>
    string(8) "OG group"
    ["title"]=>
    string(33) "OG group from Rules configuration"
    ["help"]=>
    string(60) "The OG group associated with the Rules configuration entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(12) "rules_config"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(31) "rules_config being the OG group"
      ["base"]=>
      string(2) "og"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(2) "id"
    }
  }
  ["og_membership_rel"]=>
  array(4) {
    ["group"]=>
    string(13) "OG membership"
    ["title"]=>
    string(38) "OG membership from Rules configuration"
    ["help"]=>
    string(65) "The OG membership associated with the Rules configuration entity."
    ["relationship"]=>
    array(6) {
      ["entity"]=>
      string(12) "rules_config"
      ["handler"]=>
      string(23) "og_handler_relationship"
      ["label"]=>
      string(31) "OG membership from rules_config"
      ["base"]=>
      string(13) "og_membership"
      ["base field"]=>
      string(4) "etid"
      ["relationship field"]=>
      string(2) "id"
    }
  }
}
jide’s picture

Hmmm at first look it looks like it's OG having membership tied to every entities that causes the problem.

bojanz’s picture

Title: While updating to the new dev version - Notice: Undefined index: table in views_bulk_operations_views_data_alter » Notice: Undefined index: table in views_bulk_operations_views_data_alter()

This is a bug in OG. It should not add its tables for entity types with no views integration.

Opened an issue in the OG queue: #1421084: Don't add OG views data to entity types with no views integration, and I'll add an additional check in VBO to avoid the notice for now.

jide’s picture

Good catch, thanks.

kaizerking’s picture

I got this result,
string(20) "i18n_translation_set" array(2) { ["flag_content_rel"]=> array(4) { ["group"]=> string(5) "Flags" ["title"]=> string(20) "Translation set flag" ["help"]=> string(116) "Limit results to only those entity flagged by a certain flag; Or display information about the flag set on a entity." ["relationship"]=> array(6) { ["flag type"]=> string(16) "i18n_translation" ["handler"]=> string(33) "flag_handler_relationship_content" ["label"]=> string(4) "flag" ["base"]=> string(12) "flag_content" ["base field"]=> string(10) "content_id" ["relationship field"]=> string(4) "tsid" } } ["flag_count_rel"]=> array(4) { ["group"]=> string(5) "Flags" ["title"]=> string(28) "Translation set flag counter" ["help"]=> string(54) "Include this to gain access to the flag counter field." ["relationship"]=> array(6) { ["flag type"]=> string(16) "i18n_translation" ["handler"]=> string(32) "flag_handler_relationship_counts" ["label"]=> string(7) "counter" ["base"]=> string(11) "flag_counts" ["base field"]=> string(10) "content_id" ["relationship field"]=> string(4) "tsid" } } }

bojanz’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

Try this patch, let me know if this fixes it and no other notices appear.

jide’s picture

Status: Needs review » Reviewed & tested by the community

The patch resolves the issue, and I do not see any other notice.

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks for testing.

kaizerking’s picture

resolved, Thanks

Status: Fixed » Closed (fixed)

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