?
avatar joeforjoomla
joeforjoomla
21 Dec 2016

Steps to reproduce the issue

Activate shared sessions in the global configuration

Expected result

Everything works as before

Actual result

Extensions expecting the #__session table field as client_id = 0 or client_id = 1 fail because the field client_id is left NULL

Wouldn't be better to leave by default the client_id set as 0 when a shared session is started and mark it adding a new field to the #__session table? That would avoid the need to update all extensions to evaluate the field not only as 0 but even as NULL

System information (as much as possible)

Additional comments

avatar joeforjoomla joeforjoomla - open - 21 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - change - 21 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Dec 2016
avatar zero-24
zero-24 - comment - 21 Dec 2016

Should any extension check the #__sessions table direkt? Don't we have a api for that in JSession ?

https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/session

I'm not that familiar with that part of the Libs but I would expecte something there.

And if we set any value which should we use? If you query that table direkt we need both values there so nothing is won / changed in that game or do i miss something? ;)

avatar mbabker
mbabker - comment - 21 Dec 2016

We decided to set it as NULL because client_id 0 implies the session is assigned specifically to the site application. It should be treated similarly to a foreign key in that the client_id if assigned matches directly with a Joomla application client and NULL if it is not bound.

The only parts of Joomla affected by this change are if you're creating a "who's online" feature or logout handlers. Beyond that there are few legitimate cases where direct reading of the session database table (and remember though it'll always have this extraneous session metadata that can't be turned off it won't always be the actual session's storage handler) should be considered.

avatar zero-24
zero-24 - comment - 22 Dec 2016

@mukul11 why did you just quote me? Is something of your comment missing?

avatar Bakual
Bakual - comment - 22 Dec 2016

@zero-24 Because he is a spammer. Already reported and blocked him.

avatar PhilETaylor
PhilETaylor - comment - 11 Jan 2017

can this be closed then?

avatar Bakual Bakual - change - 11 Jan 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-11 13:58:21
Closed_By Bakual
avatar Bakual Bakual - close - 11 Jan 2017
avatar Bakual
Bakual - comment - 11 Jan 2017

Since it's basically a new feature, admins will have to make sure each extension supports it before using it. Same as for other new features.

Closing as expected behavior.

Add a Comment

Login with GitHub to post a comment