View Issue Details

IDProjectCategoryView StatusLast Update
0006169OXID eShop (all versions)4.12. Subshop handlingpublic2015-07-24 12:26
Reporterd.bloessl Assigned To 
PrioritynormalSeveritymajorReproducibilityunable to reproduce
Status closedResolutionunable to reproduce 
Product Version4.9.4 / 5.2.4 
Summary0006169: oxbase->_initDataStructure has inconsistent behaviour
DescriptionThe method of _initDataStructure in oxbase behaves diffently after the first request of clearing the cache and having the cache setup.

1) If the cache is empty, the only field which is set in _aFieldNames is OXID
2) if the cache is already set up, (starting from the second request), way more fields are set

That leads to another problem: oxshopid is not loaded from the database and therefore
oxbase->getShopId() returns the shop id from oxconfig, and not the objects shop id.
The last condition in oxbase->assign() is not met on the first request.

As we have lazy loading, I would expect, that also the result of the field list from cache contains only the OXID ...
Steps To Reproduce1) Add a debug statement to _initDataStructure() before the foreach loop (like print_r($aFieldNames); die;)
2) Clear the OXID tmp folder
3) Open the site where an object is loaded, save the result
4) Comment out the debug statement
5) Refresh the page
6) Comment it back in
7) Refresh it again and compare the results
TagsNo tags attached.
ThemeAll
BrowserAll
PHP Version5.4
Database Version5.5

Activities

d.bloessl

2015-06-12 15:59

reporter   ~0011036

Note: If you have 2 Shops
1: Main shop holding the articles
2: Sub shop with articles assign

Use shop 2, load an article and put var_dump($oArticle->getShopId()); somewhere (e.g. aList - render method).

Clear the OXID tmp and open the page, you will see 2 as output.
After a refresh, the output is 1, whereas both requests should return 1.

QA

2015-06-26 10:03

administrator   ~0011063

Can't reproduce it.
Used a EE 5.2.4 and activated caching as listed:

Default Cache Backend:
    Enable caching: check
    Cache Connector: File System

Dynamic Content Caching:
    Enable caching: check
    Selected cache backend: OXID eShop Disk Storage Cache


I tried to reproduce it as described in "Steps To Reproduce". During the tests I got everytime an array ($aFieldNames) like this:

Array ( [oxid] => 0 [oxactive] => 0 [oxrights] => 0 [oxshopid] => 0 [oxusername] => 0 [oxpassword] => 0 [oxpasssalt] => 0 [oxcustnr] => 0 [oxustid] => 0 [oxustidstatus] => 0 [oxcompany] => 0 [oxfname] => 0 [oxlname] => 0 [oxstreet] => 0 [oxstreetnr] => 0 [oxaddinfo] => 0 [oxcity] => 0 [oxcountryid] => 0 [oxstateid] => 0 [oxzip] => 0 [oxfon] => 0 [oxfax] => 0 [oxsal] => 0 [oxboni] => 0 [oxcreate] => 0 [oxregister] => 0 [oxprivfon] => 0 [oxmobfon] => 0 [oxbirthdate] => 0 [oxurl] => 0 [oxldapkey] => 0 [oxwronglogins] => 0 [oxupdatekey] => 0 [oxupdateexp] => 0 [oxpoints] => 0 [oxfbid] => 0 [oxtimestamp] => 0 )



If not done yet, please try it again with a fresh installed shop without any modules or adapted shop files.