Playing with Rules, ViewRulesLoop and VBO I got into situation when my screen became full of PHP Notices like"

Notice: Undefined property: view::$style_plugin in views_bulk_operations_handler_field_operations->label() (line 183 of .../sites/all/modules/views_bulk_operations/views/views_bulk_operations_handler_field_operations.inc).

which occurred even when just views Rules Components Overview page, when Rules performs dependencies() check throught whole component structure. So it seems that style_plugin is not initialized yet.

Thanks to @timplunkett who suggested another way for checking views style_plugin.

Patch is attached.

CommentFileSizeAuthor
style_plugin_check.patch776 bytesOnkelTem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

OnkelTem’s picture

Status: Active » Needs review
bojanz’s picture

Status: Needs review » Fixed

Committed, thanks!

bojanz’s picture

Title: Change checking of 'style_plugin' in views_bulk_operations_handler_field_operations->label() » Notice: Undefined property: view::$style_plugin in views_bulk_operations_handler_field_operations->label

Didn't review this properly.

Had to revert this because it doesn't account for style plugins that inherit from table.
For that we really need the complete object.
Added a !empty check that should be a better fix.

Status: Fixed » Closed (fixed)

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