Every time I run /update.php (for any module needing an update), I get this set of 4 rows of the same error:
Notice: Undefined index: style_options in views_handler_argument->init() (line 86 of /path-to-drupal-folder/sites/all/modules/views/handlers/views_handler_argument.inc).
Notice: Undefined index: style_options in views_handler_argument->init() (line 86 of /path-to-drupal-folder/sites/all/modules/views/handlers/views_handler_argument.inc).
Notice: Undefined index: style_options in views_handler_argument->init() (line 86 of /path-to-drupal-folder/sites/all/modules/views/handlers/views_handler_argument.inc).
Notice: Undefined index: style_options in views_handler_argument->init() (line 86 of /path-to-drupal-folder/sites/all/modules/views/handlers/views_handler_argument.inc).
Whatever this error is, it's significant enough that it seems to be causing timeouts and other issues. It seems like I need to not ignore it. However, I haven't been able to find a style_options error anywhere. Anyone know what this is?
Comments
Comment #1
dawehnerHere is a small fix for that, though it would be better to actually understand how this can happen.
Comment #2
tim.plunkettSo these sections of code that look for something in
$options['style_options']is only for backwards compatibility. So there is a chance that it won't be passed anymore, so this is the correct fix.Comment #3
dawehnerThanks as always for the review! Committed to 7.x-3.x
Comment #4
somatics commentedWow, thanks for the rapid response and solution! I'm excited to install this -- it was amazing how much this messed up the update process.
Not to look a gift horse in the mouth, but would someone mind explaining this to me? I don't quite understand what @tim.plunkett says in #2. Does this fix actually disable a needed function in Views? Is it it now allowing old code in Views that shouldn't be there because it's no longer checking for it, or is it now making an updated site not work with older style options? Or something like that? As you can tell, I'm pretty unclear on what you guys are talking about, and it seems like with Views, the more I know, the less I screw up my sites! :)
Comment #5
tim.plunkettThe value of
summary ascwas a valid value fordefault_actionin an older version of Views.As it shows here, it switches it to just
summaryand sets the newersort_orderkey to ascending.This is a common use for
init(), translating old values into new ones.$options['style_options']is only used in these conversions, and would only be present in an older View, and isn't needed in Views currently.Hope that explains it! If not, come find me on IRC as timplunkett and I'll try to explain better.
Comment #6
somatics commentedFollow up: I installed the latest dev version later that day, and pushed it to my live site and ran updates. The site no longer throws these errors when I update, and update time has improved dramatically, with less situations of weird output and page loads on update completion. It appears to have cleaned out a big underlying mess during the updates.
Thanks again for such a swift and effective response to this! My database thanks you too!