Contexts created inside ECA are not persistent

Created on 23 August 2023, over 1 year ago

Problem/Motivation

Define a context using ECA, which could be used anywhere else by calling the service context_stack.eca.

Steps to reproduce

  • Create a new ECA model, with :
    • a global event (e.g. "Controller is found")
    • an action creating a local token with a fixed value "test"
    • an action creating a new context "test_context" with the value of the token "test"
  • save the model
  • add a hook_preprocess_page() in any theme or module, which load the service context_stack.eca and display all the existing contexts as Drupal messages
  • go to any page of the website
  • We have no message, as there is no contexts... All of them are cleaned by the method "cleanupAfterSuccessors()"

Proposed resolution

The created contexts should be available in the ECA context stack.

💬 Support request
Status

Closed: won't fix

Version

1.0

Component

Miscellaneous

Created by

🇱🇺Luxembourg B-Prod

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

Comments & Activities

  • Issue created by @B-Prod
  • Status changed to Closed: won't fix over 1 year ago
  • 🇩🇪Germany mxh Offenburg

    As per description on the project page, this module enables you to access objects defined from parent and root processes. In other words, it is a context stack, providing context for child ECA processes. What you're looking for is a globally accessible variable throughout a PHP process (or persistent accross multiple requests?).

    As far as I'm aware of, there is no project currently providing such feature. But maybe it makes sense for you creating a new project that provides it.

Production build 0.71.5 2024