Notice: Undefined index: base table in votingapi_views_data_alter() (line 282 of...

Does anyone knows why I get this error on the confirm page when I update a module?

Comments

Triumphent’s picture

Any development on this?.

niranto’s picture

Having the same problem :(

Please kindly advice would be very appreciated.

Thank you.

timwee’s picture

same issue

mlanning’s picture

I'm experiencing the same notice. It started when I installed the renderable elements module. If I disable it, then the notice goes away. If I enable it, it comes back. I'm not sure if that's the only module that causes this, but that seems to be my experience so far.

mlanning’s picture

Found out a little more... Under the Renderable Elements module's settings tab, there is an option to uncheck the "Enable form registration". It also states, "when enabled, this option may conflict with other modules". In my case, unchecking this option seems to get rid of the undefined index notice that voting api keeps popping up with.

mlanning’s picture

Well, I guess I spoke too soon. This still comes up after I save a content type after editing...

Notice: Undefined index: base table in votingapi_views_data_alter() (line 282 of ... sites/all/modules/contrib/votingapi/views/votingapi.views.inc).

Notice: Undefined index: id in votingapi_views_data_alter() (line 283 of ... sites/all/modules/contrib/votingapi/views/votingapi.views.inc).

deanflory’s picture

Issue summary: View changes

Voting API is not alone, there are two others that are having the same issue:

  • Notice: Undefined index: base table in forward_views_data() (line 13 of /.../sites/all/modules/forward/views/forward.views.inc).
  • Notice: Undefined index: base table in forward_views_data() (line 49 of /.../sites/all/modules/forward/views/forward.views.inc).
  • Notice: Undefined index: base table in fc_views_data_alter() (line 49 of /.../sites/all/modules/fc/views/fc.views.inc).
  • Notice: Undefined index: base table in votingapi_views_data_alter() (line 282 of /.../sites/all/modules/votingapi/views/votingapi.views.inc).

I had reported these errors to the other modules' issue queues and adaddinsane @ Field Complete stated it could have to do with an upgrade in PHP version.

adaddinsane:

More likely to be PHP upgrade fault - have you moved to 5.4? It's stricter and plays havoc with 3rd party modules.

I'm usually pretty careful but looks like I missed a check (as did the authors of the other modules).

Easy to fix though.

Looks like I did last time I updated, now on PHP 5.4.25. I was on 5.3.28.

  • PHP 5.3.27 END OF LIFE
  • PHP 5.3.28 DEPRECATED
  • PHP 5.4.25 Current Recommended <<<<<<<<
  • PHP 5.5.9 EXPERIMENTAL

Thanks maintainers for your time to look into this!

Feeling better now that this isn't some "unknown" issue with my installation that I've been working on for far too long. Having these errors show up on every page is pretty annoying though.

deanflory’s picture

I had opened a duplicate issue after this one here: https://drupal.org/node/2193259

adaddinsane provided a fixed version of Field Complete and here's what his fix was, whether that applies to Voting API code I don't know, but it might provide a hint and make the issue easier to resolve in Voting API:

Hi quick fix for this

    if (empty($entity_info['base table'])) {
      continue;
    }

placed immediately after

  foreach (entity_get_info() as $entity_type => $entity_info) {
deanflory’s picture

FYI, it is not an issue with PHP versions. I reverted back to PHP 5.3.28 and the error still exists.

I am getting this on two different Drupal installations on the same server. One has a lot of modules enabled and the other a minimal amount to fit under 128MB RAM.

Is this module being actively maintained torotil, eaton, moshe weitzman, or ChrisKennedy? I haven't seen any response from maintainers and this issue is more than 7 months old with a dev release 4 months ago that didn't take care of this issue. Seems pretty important with 53,335 current installs. Any help would be appreciated.

deanflory’s picture

Status: Active » Needs work
deanflory’s picture

Title: Notice: Undefined index » Notice: Undefined index: base table in votingapi_views_data_alter() (line 282 of /.../votingapi.views.inc).
deanflory’s picture

Closed my duplicate issue:
https://drupal.org/node/2193259

torotil’s picture

@deanflory: I'm currently not using the views integration of this module in any of our sites. So it doesn't have a high priority for me. I'm happy to review any patches tackling this issue.

Thanks for taking the time to prune the issue queue of duplicates.

deanflory’s picture

Wow. Okay. I'd think an error on every page load would have more priority but thanks for your honesty.

Are there plans for this module to make it to Drupal 8? The Rate module that has a dependency on Voting API has pledged a Drupal 8 release. With Views in core in D8 doesn't that make this issue a bit more important moving forward?

I'm just curious how much I should lean on this project for future sites and still I guess a little shocked by your "will not fix" reply since you're a maintainer.

Thanks for your time.

torotil’s picture

@deanflory: I've adopted this module because I am using it in a few currently in production sites. Back then not even issues with patches that were RTBC were committed for months. Except for those production sites I don't need voting functionality in ongoing projects and the time I'm able (or I want to) spend for Drupal in my free time is rather limited.

btw: we don't have this notice at all on our production-sites.

torotil’s picture

Version: 7.x-2.11 » 7.x-2.x-dev
Status: Needs work » Fixed

I've just committed a fix in 7.x-2.x. Please test and reopen if the problem persists.

Thanks to deanflory for posting a fix and taking care of the duplicate issues.

deanflory’s picture

Downloaded the latest dev and ran update.php and received these two new errors:

  • Notice: Undefined variable: default_relationships in votingapi_views_data_alter() (line 291 of /.../sites/all/modules/votingapi/views/votingapi.views.inc).
  • Warning: Invalid argument supplied for foreach() in votingapi_views_data_alter() (line 291 of /.../sites/all/modules/votingapi/views/votingapi.views.inc).

I then disabled and uninstalled votingapi and all modules that require it. Enabling just votingapi and none of the modules like Rate that use votingapi still resulted in the above errors.

I'll leave this current issue closed but will create a new issue for these new errors.

Status: Fixed » Closed (fixed)

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