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

dawehner’s picture

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

j0rd’s picture

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

j0rd’s picture

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

dawehner’s picture

Status: Active » Fixed

So the problem seems to be solved already. Thanks for reporting that.

Status: Fixed » Closed (fixed)

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

flightrisk’s picture

Status: Closed (fixed) » Active

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

flightrisk’s picture

I'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.

donquixote’s picture

This needs a more helpful error message, pointing to the module that is causing this.

warmth’s picture

I'm getting this error after installing Profile 2 Module with User Relationships!

pounard’s picture

I think this is a probable duplicate of #1223954: Notice: Undefined index: relationship in view->fix_missing_relationships(). I'm experiencing this bug too.

damiankloip’s picture

Status: Active » Closed (duplicate)