Batch sandbox not preserved between batch iterations

Created on 19 May 2024, 11 months ago

Problem/Motivation

I try to pass information between batch iterations but $context['sandbox'] is always empty.

Steps to reproduce

Create batch class
Add a key value to $context['sandbox']
debug the context array

🐛 Bug report
Status

Active

Version

10.2

Component
Batch 

Last updated 23 days ago

Created by

🇮🇹Italy trickfun

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @trickfun
  • Status changed to Closed: works as designed 11 months ago
  • 🇩🇪Germany ckaotik Berlin

    How is this "working as designed", when the documentation clearly states otherwise?

    // 'sandbox' (read / write): An array that can be freely used to
    // store persistent data between iterations. It is recommended to
    // use this instead of $_SESSION, which is unsafe if the user
    // continues browsing in a separate window while the batch is processing.

  • same issue in here, the sanbox is not preserving the data bettween operations :(

Production build 0.71.5 2024