Can't run two VBO sessions at the same time

Created on 4 May 2020, about 5 years ago
Updated 15 May 2025, 9 days ago

Problem/Motivation
VBO saves the state of the checkbox selections in a private temp storm keyed by the user ID. So running two sessions on the same page as the same user causes problems even if the pages are on different browsers or computers.

This has proved confusing for my users and it would be great to allow them to do it.

Passing user ID to getTempstore() seems pointless as the code prefixes the argument with the user ID to make the key anyway, so it would work just as well passing a constant like getTempstore('VBO').

Proposal
A change to save the temp store data keyed by the session ID would allow processes in the same session to access its own data, but allow another session to access its own different data.

It requires two lines of code to make the change, in getTempstoreData() and setTempstoreData(), e.g.

  /**
   * Gets the current view user tempstore data.
   *
   * @param string $view_id
   *   The current view ID.
   * @param string $display_id
   *   The display ID of the current view.
   */
  protected function getTempstoreData($view_id = NULL, $display_id = NULL) {
    $data = $this->getTempstore($view_id, $display_id)->get(session_id());

    return $data;
  }

I've done some cursory testing and seems to work OK.

Feature request
Status

Active

Version

3.6

Component

Core

Created by

🇬🇧United Kingdom hughworm

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024