View Issue Details

IDProjectCategoryView StatusLast Update
0006186OXID eShop (all versions)4.01. Database handlingpublic2024-02-13 11:02
Reporterd3 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.7.0 / 5.0.0 revision 51243 
Summary0006186: oxArticle::delete() method is inconsistent
DescriptionThe method does'nt check if a database entry with this oxid exists.
So the called method oxArticle::_updateParentDependFields() resets multiple fields in table oxarticles.

KH
Steps To ReproduceTry:
/** @var $oArticle oxarticle * */
$oArticle = oxNew('oxarticle');
$oArticle->delete('IdDoesNotExists');

and the SQL of oxArticle::_updateParentDependFields looks like:
UPDATE `oxarticles` SET `oxnonmaterial` = '0', `oxfreeshipping` = '0', `oxisdownloadable` = '0', `oxshowcustomagreement` = '0' WHERE `oxparentid` = ''

Additional InformationoxArticle::delete() should use oxArticle::exists() before the method take action
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

d3

2015-07-13 11:13

reporter   ~0011091

The behavior is also present in the current version.
KH