Skip to content

Commit

Permalink
Fix Field Import (J! 4.x)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Oct 9, 2022
1 parent 475bdf2 commit 4b46b2f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/cck/base/install/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ public static function importElement( $elemtype, $path, &$data, $config = array(
if ( $pk > 0 ) {
$item->id = $pk;
}
$item->store();

// TODO later: ->check()

if ( !$item->store() ) {
// var_dump( $item->getError() );
}
$call = 'afterImport'.$elemtype;
self::$call( $xml, $elemtype, $item, $data );
}
Expand Down Expand Up @@ -170,6 +175,9 @@ public static function beforeImportField( $elemtype, &$item, $data, $config = ar
require_once JPATH_SITE.'/plugins/cck_field/'.$item->type.'/classes/app.php';
JCck::callFunc_Array( 'plgCCK_Field'.$item->type.'_App', 'onCCK_FieldImportField', array( &$item, $data ) );
}
if ( is_null( $item->storage_key ) ) {
$item->storage_key = '';
}

return $pk;
}
Expand Down

0 comments on commit 4b46b2f

Please sign in to comment.