Getting these on two separate sites:

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).

On one, I completely disabled and uninstalled Forward and Forward Services, then enabled them again, still getting the errors.

Forward is not alone, there are two others that are having the same issue (I think after Drupal 7.24 update, not sure, could have been other module updates during the same time):

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).

Comments

deanflory’s picture

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.

Thanks 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.

deanflory’s picture

  • PHP 5.3.27 END OF LIFE
  • PHP 5.3.28 DEPRECATED
  • PHP 5.4.25 Current Recommended <<<<<<<<
  • PHP 5.5.9 EXPERIMENTAL
deanflory’s picture

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

Hi quick fix for this

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

placed immediately after

  foreach (entity_get_info() as $entity_type => $entity_info) {
john.oltman’s picture

dean, I recommend going back to PHP 5.3 and seeing if that solves your issues:

https://drupal.org/requirements

5.3 is the recommended version of PHP for Drupal 7

deanflory’s picture

Thanks John, will try it out tonight.

deanflory’s picture

john.oltman, reverting back to PHP 5.3.28 did not fix the issues. These errors are still showing up after running update.php and then clicking the home link and they appear on the home page of two different sites (one with lots of modules enabled, the other with only a minimal amount to fit under 128MB of RAM for a client's server). So I am still getting consistent errors on the same server with two different installations.

  • 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).
deanflory’s picture

Keeping it fresh.

deanflory’s picture

Status: Active » Needs work
john.oltman’s picture

Category: Bug report » Support request
Status: Needs work » Active
john.oltman’s picture

deanflory, i thought you had previously indicated you had tried to move between versions of Forward. 2.x to 3.x or something like that. Which isn't supported. Have you completely uninstalled Forward using the Module Uninstall Feature (not just disabled the module, but uninstalled it) and then re-enabled the module. Because it sounds like you have the wrong database tables mismatched with the wrong version. Uninstall will remove the tables so you can start fresh.

deanflory’s picture

As noted in my original post, I have indeed disabled AND uninstalled the Forward and Forward Services modules, then re-enabled them.

Just to try again one last time (as resetting all the settings and e-mail templates is tiresome), I disabled, uninstalled and reenabled the Forward and Forward Services modules. After this 3rd or 4th attempt the issue remains the same. As soon as cache is flushed it comes back (flushed twice, ran cron).

Something is stuck somewhere on my installation OR there is a bug in the module.

I even checked via phpMyAdmin after the Forward and Forward Services modules were uninstalled to make sure there were no "forward" tables and there were none. When re-enabled these two tables show up:

  • forward_log
  • forward_statistics

Is there a table missing as I still get:

  • 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).

Are there variables or other tables that should be manually dropped from the db?

----------
Edit: Upon going to articles and pages in the site after this last uninstall/reenable, it seems the error might have gone away. I'll post back here if it does persist as it did before. If I don't then consider this fixed and some random fluke since the previous attempts did not come to the same resolution.
----------
Edit 2: It appears the error isn't happening on every page now, but it is still showing up after flushing cache and returning to the home page after running update.php (which I think flushes cache). So there are still errors.

john.oltman’s picture

You have an entity without a base table. Make sure logging is enabled and then insert this line as a new line 10 of sites/all/modules/forward/views/forward.views.inc:

watchdog('forward', '<pre>'.print_r($entity_types,1).'</pre>');

Then after getting the error, go to the log and post the contents of the entity types array here so i can see what entities you have.

deanflory’s picture

Thanks John, I'll try that out in a little bit (not sure why I didn't see your response before now in my dashboard), just wanting to update the issue as the line numbers have changed in case others are searching:

Notice: Undefined index: base table in forward_views_data() (line 14 of /.../sites/all/modules/forward/views/forward.views.inc).
Notice: Undefined index: base table in forward_views_data() (line 50 of /.../all/modules/forward/views/forward.views.inc).
Notice: Undefined index: base table in forward_views_data() (line 14 of /.../sites/all/modules/forward/views/forward.views.inc).
Notice: Undefined index: base table in forward_views_data() (line 50 of /.../sites/all/modules/forward/views/forward.views.inc).

deanflory’s picture

OK, it looks like I had seen your response, put that code in, then never check on the results, duh.

Attached are the array errors from two of the sites where I'm receiving the error. The "site2_smaller" one should be far less to review.

FYI, the site1_larger is reported from an error on a missing image (path looks wrong, investigating) but the site2_smaller is on my home page's panel page directly after running update.php, then clicking the home page link on the results page.

I'm also getting php warnings on one site:

Warning: Cannot use a scalar value as an array in drupal_render() (line 5948 of /.../includes/common.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6428 of /.../includes/common.inc).

Googling that error only comes up with this page, so I'm not the only one getting that, but this error might not be related to this issue:
http://drupal.stackexchange.com/questions/46116/cannot-use-a-scalar-valu...

john.oltman’s picture

This module introduces an entity type without a base table:

https://www.drupal.org/project/page_manager_search

Please apply the attached patch and let me know if this fixes it.

If yes, I'll commit. This is for 7.x-3.x only.

john.oltman’s picture

Assigned: Unassigned » john.oltman
Status: Active » Needs review
deanflory’s picture

After applying the patch in #15 and updating, here's what I'm getting on /admin/reports/status:

Small site:
Notice: Undefined index: base table in forward_views_data() (line 53 of /.../sites/all/modules/forward/views/forward.views.inc).

Large site:
Notice: Undefined index: base table in forward_views_data() (line 53 of /.../sites/all/modules/forward/views/forward.views.inc).

john.oltman’s picture

Just needed to duplicate that new code further below. Try the attached patch instead.

deanflory’s picture

Status: Needs review » Reviewed & tested by the community

Patch #18 appears to have fixed the issue. Thanks for all your hard work and time John, it is appreciated!

john.oltman’s picture

Version: 7.x-3.x-dev » 8.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Fixed in 8.x

Use the patch for 7.x

Status: Fixed » Closed (fixed)

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