View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005711||OXID eShop (all versions)||4.02. Session handling||public||2014-03-25 14:49||2015-02-25 18:09|
|Product Version||4.8.1 / 5.1.1|
|Target Version||Fixed in Version|
|Summary||0005711: oxConfig::getShopId() doesn't return shop id from session because session isn't opened before querying it|
|Description||We have "blDeprecatedSubshopsInSessions" set to true|
In oxConfig::getShopId() you open session only
if ( !oxRegistry::get("oxConfigFile")->getVar('blDeprecatedSubshopsInSessions') ). So in our case session isn't opened and after this if you call $this->_iShopId = (int) oxSession::getVar('actshop' ), which doesn't return anything because session isn't opened
|Steps To Reproduce||1) Go to payments page, i.e. |
2) remove "shp" from URL (if you hit Enter then you will be redirected to start page, because shop id isn't found)
3) You can debug oxConfig::getShopId() and will see that it is unable to get shop id from session because session isn't opened
|Tags||No tags attached.|
Reminder sent to: rimvydas.pranciulis
Hi, could you please provide the use case when you find this problem. It would be easy for us to figure out the problem. Thanks in advance.
It is difficult to provide use case because I got this error on payment page, but we are using 3rd party Skrill module and without it same scenario is impossible
It will be easier to explain if you just look at your code (oxConfig::getShopId(), EE 5.1.1): you are opening session only if blDeprecatedSubshopsInSessions is set to "false".
We have it set to "true", so session isn't opened, and $this->_iShopId = (int) oxSession::getVar('actshop' ); (oxconfig.php, line: 892) obviously isn't going to return shop id
Mail was sent to dev general subject: "Do you use blDeprecatedSubshopsInSessions".
Waiting for response.