I have error message on site

Notice: Undefined index: views_bulk_operations in views_calc_table->get_calc_fields() (line 268 of Z:\home\erpal.local\www\profiles\erpal_starter\modules\contrib\views_calc\views_calc_table.inc).
Notice: Undefined index: views_bulk_operations in include() (line 26 of Z:\home\erpal.local\www\profiles\erpal_starter\modules\contrib\views_calc\views-calc-table.tpl.php).

After debuging I noticed that in the file views_calc_table.inc $options['columns'], $options['info'] and $fields arrays have different keys. The same issue in the file theme.inc.

Here is the $options['columns'] and $options['info'] arrays :
$options

And here is the $fieldds array:
$fields

Keys views_bulk_operations and views_bulk_operations_1 are different! But I don't know how can it be...

After it we have different keys in $options['info'] and $fields arrays. And using string like

$options['info'][$field]

in looping fields causes error.

I saw using of function

$columns  = $handler->sanitize_columns($options['columns'], $fields);

that merges array into $columns:
$columns.

using $columns = $options['columns']; instead of $columns = $handler->sanitize_columns($options['columns'], $fields); solves the issue in the views_calc_table.inc. But in theme.inc issue still present...

Comments

a.milkovsky’s picture

StatusFileSize
new2.76 KB

I added checks in views-calc-table.tpl.php.
This partially fixes the issue

a.milkovsky’s picture

Assigned: Unassigned » a.milkovsky
Status: Active » Closed (fixed)

I ve fixed this issue.
If you ever notice this strange issue just switch to other layout type (I switched to table) and than back to views calc. It recreates indexes of all fields

skdrupal88’s picture

Thank you @a.milkovsky so much for sharing your experience, it helped me!

a.milkovsky’s picture

Assigned: a.milkovsky » Unassigned