View Issue Details

IDProjectCategoryView StatusLast Update
0005433OXID ERP InterfaceOXID ERP Interface - subpublic2023-11-21 10:10
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version2.11.1_54476 
Summary0005433: You will never get an error message when you have a typo in categorie parent id
DescriptionWhen you have a CSV import file where a category parent id doesn't exist im shop, the erp module will give you the error:

File[/shop/export/import.csv] - dataset number: 0 - Error: ---

This is because of this try block in the methode _importOne() (\modules\erp\oxerpbase.php):

try {
    $blImport = $this->$sFnc($oType, $aData);
    $sMessage = '';
} catch (Exception $e) {
    $sMessage = $e->getMessage();
}

The shop will return a false (\application\models\oxcategory.php):


protected function _insert()
{
    if ( $this->oxcategories__oxparentid->value != "oxrootid") {

        // load parent
        $oParent = oxNew( "oxCategory" );
        //#M317 check if parent is loaded
        if ( !$oParent->load( $this->oxcategories__oxparentid->value) ) {
            return false;
        }


So the catch-try block from above will get no exception, but a false. Because of this, we have an empty message and the customer does not know, what the error is.

If we throw an exception when the parent couldn't be loaded, the erp module handle the exception and the customer can get an error message to fix the failure.
The same error will be there for the SOAP interface, but I didn't checked it out.
TagsCSV, ERP, Exception, Import

Activities

There are no notes attached to this issue.