View Issue Details

IDProjectCategoryView StatusLast Update
0005711OXID eShop (all versions)4.02. Session handlingpublic2015-02-25 18:09
Reporterrimvydas.pranciulis Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version4.8.1 / 5.1.1 
Summary0005711: oxConfig::getShopId() doesn't return shop id from session because session isn't opened before querying it
DescriptionWe 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 Reproduce1) Go to payments page, i.e.
http://{YOUR_HOST}/index.php?force_sid=a51jgse6m9b64ugao16ee4s8i5&payerror=-99&cl=payment&stoken=C19A22BD&shp=2
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
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Version5.4
Database Versionany

Relationships

related to 0003075 resolvedLinas Kukulskis Active subshop ID value is dropped from session, default shop id is set 

Activities

svetlana

2014-03-28 13:28

reporter   ~0009780

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.

rimvydas.pranciulis

2014-03-28 14:21

reporter   ~0009783

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

svetlana

2014-04-30 13:13

reporter   ~0009875

Mail was sent to dev general subject: "Do you use blDeprecatedSubshopsInSessions".
Waiting for response.