Closed (won't fix)
Project:
Views Bulk Operations (VBO)
Version:
6.x-1.7
Component:
Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2009 at 14:26 UTC
Updated:
20 Jan 2010 at 22:43 UTC
When I select more than one node and run arbitrary PHP script, I get this error:
An error has occurred.
Please continue to the error page
An error occurred. /batch?id=19&op=doThen I click on the linked words error page and am taken to http://issuetracker/batch?id=19&op=finished.
Instead of ending up at /batch?id=19&op=do, I am redirected to /bulkoperations (the VBO view page) and see this in green text at the top:
An error occurred while processing _views_bulk_operations_batch_process with arguments: _views_bulk_operations_batch_process
If I go to admin/reports/dblog, I see no error details whatsoever.
I am merely executing node_save($object); per #28 at #195013: Recompute all instances of a computed field upon field change.
Comments
Comment #1
aren cambre commentedWhoops, the entry above is mistaken. I am not entering the PHP delimiters. I am just entering
node_save($object);for the arbitrary PHP script.Again, this works fine if I select only one node. It fails when selecting 2 or more.
Comment #2
aren cambre commentedMore details. Implemented the script in #9 of the same issue in a page node:
Upon executing the page, I get this error:
Fatal error: Cannot redeclare fibonacci_conversion() (previously declared in /var/www/drupal/sites/issuetracker/modules/computed_field/computed_field.module(161) : eval()'d code:1) in /var/www/drupal/sites/issuetracker/modules/computed_field/computed_field.module(161) : eval()'d code on line 14Yes, I do have my computed field instantiating a function.
VBO causes each node to execute in a shared namespace? Is this safe? Shouldn't node X's data be cleared before we start executing node Y? Otherwise we could have data residue from prior nodes that affects subsequent nodes.
Comment #3
aren cambre commentedI may have solved it by adding an
if function_existscheck before declaring the function in the computed code. But I still wonder about the broader implications of data residue not being cleared between processing each node.Comment #4
aren cambre commentedUpdating title.
Comment #5
infojunkieIMO, the code in Computed Field isn't meant to contain function declarations. You can simply place that function in a new module and call it from the Computed Field script.
Comment #6
stkrzysiak commentedThanks for the info Aren, I was essentially doing the same thing as you and that is when I encountered this. I went with just creating a module(thanks for the tip kratib) since I will be using the function in multiple computed fields and can foresee this being a headache in the future!