First thanks for this amazing module to make the batch work simpler.
This morning I received a bug report email from the web user. Here is the error information:
Performing Modify node taxonomy terms on selected rows...
An error has occurred.
Please continue to the error page
An error occurred. /en/batch?id=16&op=do
Fatal error: Cannot break/continue 1 level in /var/www/sites/all/modules/views_bulk_operations/views_bulk_operations.module on line 698
I am also waiting them to give me more details like how this happened, because I have not encountered issue before.
But, I check the line 698 in Ver6.10 and find following snippet:
if (!$object) {
$context['results']['log'][] = t('Skipped %action on @type id %oid.', array(
'%action' => $operation['label'],
'@type' => t($operation['type']),
'%oid' => $oid,
));
continue;
}
I wonder can we use 'return' to replace 'continue'?
if (!$object) {
$context['results']['log'][] = t('Skipped %action on @type id %oid.', array(
'%action' => $operation['label'],
'@type' => t($operation['type']),
'%oid' => $oid,
));
//continue;
return;
}
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_bulk_operations-1030574-v1.patch | 393 bytes | muhleder |
Comments
Comment #1
thomasmuirhead commentedHi there,
We're getting exactly the same error.
Did you try the change above? Did it work?
Thanks
Thomas
Comment #2
muhleder commentedThat continue should almost certainly be a return. It looks like the code wasn't fully updated when (if?) the function was turned into a batch process.
The calling function is
and continue would make sense if the code from _views_bulk_operations_batch_process() was actually contained in the foreach loop. In it's current state return; should have the same effect as continue; might have done in the past.
Comment #3
muhleder commentedAnd here's a patch fwiw.
Comment #4
eric.chenchao commentedYes, that works and thanks for reviewing:)
Comment #5
muhleder commentedChanging status to RTBC for review by maintainer.
Comment #6
rjbrown99 commented+1 same problem, patch works. Thanks.
Comment #7
infojunkieThanks for the debugging and patch. Committed to latest dev.
Comment #8
infojunkie