A new feature for SilverStripe should be ...

Core state handling to fix subsites / translatable / etc

Right now we have _lots_ of ad-hoc cross-request state tracking.

State is any inputs that affects the cross-section of data that ends up being visible to DataObject

Versioned, Subsites, Translatable and several others are examples of this.

We already have DataQuery#$queryParams to track some of this state internally, but when it comes to tracking it across requests, every module has it's own solution.

The worst are those modules that store it in the session, since this affects all tabs / windows being used by that user, which can lead to unexpected behaviour.

This API would instead allow reading state encoded in domain names (i.e. en.example.com), URL portions (example.com/en), GET parameters (example.com?lang=en), headers (x-language: en) or in the worst case in session data, and then make sure all links & forms propagated that state in the preferred location.

7 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Hamish Friedlander shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base