The tag refers to the Drupal core API that allows developers to split a big task in to several minor chunks or batches.

learn more… | top users | synonyms

0
votes
0answers
6 views

Drush batch-process sometimes stops for no reason or error - option to auto restart?

Sometimes drush batch-process stops, and I have to restart it manually. I tried using a for loop, but that seems a bit of an overkill. Does drush have any option to auto restart if it stops prior to ...
1
vote
1answer
27 views

Long-running cron task never fully executed

I am developing a Drupal Cron that has a very long-running task. First I tried with a simple Cron, which, of course, did not work because of "Memory exhausted" PHP fatal error. Then, I developed a ...
0
votes
1answer
24 views

Assigning roles to all users during hook_install

I have a module that needs to create a new role and assign all users to that new role while it's being installed. I have the code to make this happen; however, currently I have 1500 users on my ...
2
votes
2answers
19 views

Do PHP static variables persist across Batch API batch items processing?

Do PHP static variables, which do persist during a normal page request, persist between progressive Batch API runs? What about during non-progressive (command-line) batch execution? Does ...
0
votes
1answer
19 views

Start next batch process automatically

Is it possible to start next batch_set() after finishing first one? I've some import functionality which includes 4 steps. The next step takes data processed from first batch process so this is ...
0
votes
1answer
55 views

Run Batch process every 1 hour

Currently, I have a batch process that is triggered on a form submit. With more detail, I have something like this: function mymodule_form_submit($form, &$form_state) { // call some functions ...
0
votes
0answers
61 views

Same code, different ouput when using Batch API

I have two form submits in a custom module. The first one, mymoodule_form_submit1 uses Batch API, the second, mymoodule_form_submit2 doesn't. I can get the correct value of $out_array only on the ...
0
votes
0answers
50 views

Saving nodes very slow

I'm trying to save 4600 nodes but its taking a long time approx. 8 hours estimated time. When I try to save a single node, it took 40 seconds to save it. I couldn't figure out why it is this slow. ...
1
vote
2answers
53 views

How to trigger consecutive batch operations using the output of the first one?

I have 2 operations in a module using Batch API. Below is the code for the first one: function get_first_data($qc, $path) { $testsets = some array... foreach ($testsets as $testset) { ...
0
votes
0answers
17 views

drush batch process error : WD views bulk operations: Skipped due to insufficient permissions

When I start a bulk operation, and stop it and switch to drush batch-process, I am getting such error messages: WD views bulk operations: Skipped "my function name" [error] on node xxxx due to ...
0
votes
0answers
9 views

Views page load indication batch api

I have created a view and put it on a custom page using panels. Sadly my query is too complicated and the page times out after about 10 seconds. On top of this i wanted my page to provide a 'loading' ...
0
votes
0answers
7 views

Batch API deletes Field Collection Items Generated in the process

I have a custom batch process to import/generate field collection items for a node. The number of field collection items to be generated is about 700+. I could see that the field collection items are ...
0
votes
1answer
32 views

How to debug Batch API more efficiently?

I've some issues with Feeds importing (I don't want to focus on particular case) and I'd like to find the way of able to debug Batch API processing more efficiently. Given the fact of complexity of ...
2
votes
1answer
46 views

How do I make batch callbacks as class methods?

This is the code I am using. $serviceClass = \Drupal::service('abcclass.service'); $batch = array( 'title' => t('Pushing updated.'), 'init_message' => t('Start Pushing.'), ...
0
votes
0answers
19 views

Display batch operations messages

I have defined a batch, everything works ok, but I want to understand how the messages are displayed. So I have this batch: $batch = array( 'title' => t('Generate reports'), 'operations' => ...
2
votes
2answers
101 views

Drupal batches return error “No Active Batch”

Whenever I run any functions that require a batch to run (delete users, manually check for updates, etc.), the Batch API returns an error "No Active Batch". I have scoured the internet for pointers, ...
0
votes
1answer
44 views

Using batch api without a form

I have a page that does use the form api. When I go to that page via hook_menu I want to run a batch script. I have looked at the batch example module and have come up with the following: My page ...
0
votes
1answer
16 views

Batch operations: callback_batch_operation() not invoked

I have a batch process where the callback_batch_operation() functions are never called, as showed when logging with some Devel dd() calls. Here is the involved code fundamental parts (all this in the ...
1
vote
1answer
64 views

Add items to batch queue operations on the fly

I have some code which generates a batch with a single operation; to go off to an API and get some data. This data could be any number of items. I would like to be able to populate the rest of the ...
0
votes
1answer
25 views

How to solve claimitem() in batch process?

I am doing batch process in D8. here is my code: This code is in Controller.php $batch = array( 'title' => t('Started Importing node Data.'), 'error_message' => t('Error!'), ...
0
votes
1answer
39 views

How can I use batch process in drupal without browser? [closed]

How can I use batch process in Drupal without browser? I want to use batch process in headless Drupal.
0
votes
2answers
64 views

504 Gateway Time-out error in batch process in drupal 6

I have submit the custom form using batch process in which process I have upload big xml file(min 200MB) and read xml file and inserted xml data in database but after 30~35 minits batch process ...
0
votes
1answer
58 views

How do I process a huge list of files?

I have a huge list (> 100 000) of files that need to be processed. I want processing to run in the background and continuously (when it has processed the last, it just restarts on the first). I've ...
2
votes
3answers
208 views

How to handle non-fatal errors during batch operations?

Most tutorials about Drupal batch processing suggests that you provide something like the following as a callback for when the batch has finished. function mymodule_finished($success, $results, ...
0
votes
1answer
118 views

Batch Process in D8 [closed]

I'm trying to create a batch process in Drupal 8, but I'm getting the following error: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'logs_export_data' not ...
1
vote
0answers
49 views

BATCH api An error occurred. Fatal error : Out of memory

I'm using batch API in a custom module to clone millions of nodes programmatically but I am facing an error: An error occurred. /batch?id=7&op=do Fatal error: Out of memory (allocated ...
4
votes
1answer
157 views

Hitting the back button after a batch process cause a nasty error

I have a batch process (using batch API) that runs when a user on my site tries to launch a non signed Java applet. The batch process does all the needed codesigning and other things and then ...
0
votes
0answers
11 views

Problem to Setting Batch in Drupal 6

I am new in Drupal world and facing some problem to set batch process in Drupal 6. It's not showing error or warnings showing some progressing bar but not achieving the required results It seems it's ...
0
votes
1answer
48 views

Drupal 7 Batch api process next operation if existing operation is taking too much time

I am using batch api for processing the operations. In my operation I am sending xml request to different-different external server and waiting for its response, after getting its response I am ...
0
votes
0answers
12 views

Batch set in multilingual website

I have the following function to process/set my batch function setBatchingProcess() { global $language; $batch = array( 'title' => variable_get('batch_title'), // t('Saving and sending'), ...
2
votes
1answer
129 views

Can I put batch api callbacks in an include file?

I have a .module file that is getting quite lengthy, and I added some batch functionality to it. I put the form and batch callbacks in a separate .inc file, and added the appropriate file directive to ...
0
votes
1answer
150 views

How to get batch ID?

I'm running some really long batch process. So in case user navigates away from the batch progress page, I'd like to be able to give him a link that leads back to that page. How can I get the batch ID ...
1
vote
0answers
31 views

Why do batch operations not run for user deletion?

On a client's website, batch operations don't run when cancelling/deleting a user account (No progress bar shows up and no process runs). Neither of the users have any content related to them as ...
0
votes
1answer
29 views

Batch API callback method is not call

Here is my source: function sc_delete_user_confirm_form_submit($form, &$form_state) { //... $batch = array( 'operations' => array(), 'finished' => ...
0
votes
0answers
96 views

Batch job not running callback

I am trying to run a batch job of importing items from a csv file. When I click submit on my form and my batch process starts, I do get a batch process bar which says its progressing, but it never ...
1
vote
0answers
137 views

Can't Get Batch Processes To Complete/Start Anymore - No Progress Bar

I have tried many different actions that use the /batch?op=start&id operation in Drupal. For some reason, nothing is working anymore. Can't download module updates, delete users, run VBO ...
0
votes
0answers
30 views

What's a good size for each batch in an upgrade script?

I'm adding an upgrade routine to my D7 module's .install file. This is a public module used on thousands of sites, so the upgrade needs to work in a variety of situations. The task is to process and ...
0
votes
1answer
264 views

Why won't this update in hook_update_n() run in batches correctly?

I am working on this issue in the Feeds issue queue: https://www.drupal.org/node/2341407 I am trying to make the updates to the importers run in batches. I can't figure out why this won't run in ...
0
votes
2answers
53 views

Batch API is setup in my module but it does not open batch window progress

I am learning hot to use Drupal for my physics PHD. I was studying how to insert a batch into my custom module. I wrote a simple module which allows to upload a CSV through a form, check the extension ...
1
vote
1answer
43 views

Batch operation for consuming data from API via drupal_http_request

I am consuming data from an API which provides a URL similar to: http://data.something.com/api/records?pageIndex=0&pageSize=25 The API will return XML which I will then use to create nodes. There ...
1
vote
1answer
71 views

Batch operations not called

I have a module with batch operations, this is my hook_menu $items['some-pretty-url'] = array( 'title' => 'Title', 'page callback' => 'drupal_get_form', 'page ...
0
votes
1answer
179 views

Drush and batch

i got an array of items. On each item, a process is executed wich manipulates data, write things to the database,... When i execute my drush script (ex: drush mycommand) i start a batch process: ...
2
votes
1answer
352 views

Drupal 7: Permission Denied (403) using /batch

I have run into a scenario where I am getting an 'Permission Denied' error when attempting to run anything that uses batch, with the sole exception being CRON. First off, this error is NOT related to ...
0
votes
1answer
281 views

How to speed up Batch API processing

Ok, so I've got a script that's going to go through about 13000 nodes (which might be part of the problem, but I don't think it is). I can either put them as one large array, which seems to go ...
0
votes
0answers
135 views

Deleting user accounts produces error

I am getting an error when I try and delete old user accounts that I've been testing with. The batch operating hangs for the max execution time and either gives a max execution time error or max ...
1
vote
1answer
232 views

Batch process stuck repeating first operation over and over

It's my first time working with the Batch API. I have a batch operation that I have almost working, but it gets stuck on the first item and I'm out of ideas on how to fix it. What the batch thing ...
0
votes
1answer
100 views

Is there a Self-Imposed Bulk Operations Limit?

My database has millions of nodes. We've been approved to delete a very large amount of them given certain criteria so I set up a view with VBO to handle the batch deletions. I've exposed the pager ...
1
vote
3answers
133 views

Is it possible to publish from my local computer a node in my drupal page remotely?

I wonder if it is possible from a SH script on my local computer, publishing content on a remote installation of drupal. Why have a gammu sms gateway and when a new sms on my local computer I want to ...
0
votes
1answer
83 views

Batch API and Drupal on a Dreamhost dedicated server

I am on a Dreamhost dedicated server. I use it to host Drupal sites that our company creates. We recently moved on to this server from another hosting company and have noticed that Batch API features ...
3
votes
1answer
248 views

Is it possible to use the batch API with drupals database transactions?

I'm using the batch api for reading large csv files and storing some information in my database. If something fails during the batch run I want all the processed information to be gone, I would like ...