Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
7.x-3.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2011 at 04:10 UTC
Updated:
1 Sep 2012 at 17:56 UTC
I used the automatic update feature of D7 and updated views to rc3. I then ran phpupdate on my test machine and got this:
Notice: Undefined index: base in view->fix_missing_relationships() (line 439 of C:\wamp\www\drupal\sites\all\modules\views\includes\view.inc).
Can this be ignored? Anyone know why it might have happened?
Comments
Comment #1
dawehnerIf this doens't work one of your installed modules is broken, because it defines a relationship without a proper base.
Maybe you could put some php code before that line to find out which $option['table'], $option['field'] this is.
Comment #2
j0rd commented@flightrisk are you using the `references` module to provide node reference and user reference?
I am, and I'm currently having this problem as well. I suspect this is the problem.
Comment #3
j0rd commentedFor me actually, I was modifying views filters in hook_views_pre_view(). I changed me to code to execute from hook_views_pre_execute() and the error went away.
This is because the proper values are set in pre_execute, where if you set them in pre_view they'll never get properly initialized.
Comment #5
dawehnerSo the problem seems to be solved already. Thanks for reporting that.
Comment #7
flightrisk commentedI'm confused, this is fixed how? Is jord a maintainer and did he post a fix? I just upgraded my simplenews module and when I ran phpupdate I got this error:
Notice: Undefined index: base table in date_views_base_tables() (line 103 of C:\wamp\www\mckenzie\sites\all\modules\date\date_views\date_views.module).
Notice: Undefined index: profile2 in calendar_views_templates() (line 44 of C:\wamp\www\mckenzie\sites\all\modules\calendar\includes\calendar.views_template.inc).
Notice: Undefined index: base in view->fix_missing_relationships() (line 579 of C:\wamp\www\mckenzie\sites\all\modules\views\includes\view.inc).
Notice: Undefined index: base table in date_views_base_tables() (line 103 of C:\wamp\www\mckenzie\sites\all\modules\date\date_views\date_views.module).
Comment #8
flightrisk commentedI'm sorry, but I am not a PHP programmer. Could you supply what code I could put in there? I can use a text editor ;) Also, how can I check this error by running some other function? These errors only show when I have a module that runs something from update.php. Other than that, I don't know what report to run to see if the error is fixed or not.
Comment #9
donquixote commentedThis needs a more helpful error message, pointing to the module that is causing this.
Comment #10
warmth commentedI'm getting this error after installing Profile 2 Module with User Relationships!
Comment #11
pounardI think this is a probable duplicate of #1223954: Notice: Undefined index: relationship in view->fix_missing_relationships(). I'm experiencing this bug too.
Comment #12
damiankloip commentedYep, I think so. Closing a dupe of #1223954: Notice: Undefined index: relationship in view->fix_missing_relationships()