View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005433 | OXID ERP Interface | OXID ERP Interface - sub | public | 2013-09-24 10:37 | 2023-11-21 10:10 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 2.11.1_54476 | ||||
Summary | 0005433: You will never get an error message when you have a typo in categorie parent id | ||||
Description | When 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. | ||||
Tags | CSV, ERP, Exception, Import | ||||