View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005852 | OXID eShop (all versions) | 4.12. Subshop handling | public | 2014-08-14 18:56 | 2023-12-20 15:21 |
Reporter | finnegan | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | Linux | OS | centOS | OS Version | 6 |
Product Version | 4.8.6 / 5.1.6 | ||||
Summary | 0005852: Only EE - prevent loading wrong subshop field contents in case of field content error - improve code | ||||
Description | I reported issue 0005081 which was closed due to non-reproducability. Meanwhile I have found the problem for this issue: I had 1 record in the table oxfield2shop where OXID was EMPTY (maybe due to a former database problem or whatever). Therefore in the function setProductData(...) in the oxfield2shop class the call: if ( $this->load( $oDb->getOne( $sQ, false, false ) ) ) { will load a random oxfield2shop record, because $oDb->getOne( ..) will return an empty string and $this->load will load a random record. Although this is not a bug because the field oxid of the table oxfield2shop should never be empty, you could prevent this behaviour by simply checking for oxid <> empty: $sOxid = $oDb->getOne( $sQ, false, false ); if ($sOxid && $this->load( $sOxid ) ) { .... | ||||
Steps To Reproduce | - assign some articles of the master shop to a subshop - change the content of some subshop-dependent fields - take a random oxfield2shop record - manually empty the oxid field to simulate a database problem - display articles in the subshop where no changes to subshop-dependent fields were made Result: these articles will show the wrong content in the subshop-dependent fields (should be content of the master shop article) | ||||
Tags | No tags attached. | ||||
Theme | All | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
has duplicate | 0005081 | resolved | Linas Kukulskis | EE: subshop fields not assigned correctly |