Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294626

saving to private tempstore doesn't start a session for anonymous users

$
0
0

Private tempstore should store a value that persists with the user's session.

However, if the user is anonymous, then this is broken, because saving to tempstore doesn't start a session.

You can see the problem by running this code (eg in Devel's exec PHP form). Each execution causes a new row in key_value_expire:

\Drupal::service('user.private_tempstore')->get('test')->set('test', 'test value!');

The expected behaviour is that after the first row is inserted, subsequent executions just update it.


Viewing all articles
Browse latest Browse all 294626

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>