diff --git a/CHANGELOG.md b/CHANGELOG.md index 96342acb..ad8a0dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- Fix `add` operations when a linked object already exists before the plugin container fields are created. + ### Fixed - Fix left side menu url (with `DIR_MARKETPLACE`) diff --git a/inc/container.class.php b/inc/container.class.php index f0febac9..16d249c5 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1780,6 +1780,7 @@ public static function preItemUpdate(CommonDBTM $item) self::preItem($item); if (array_key_exists('_plugin_fields_data', $item->input)) { $data = $item->input['_plugin_fields_data']; + $data['itemtype'] = $item::class; $data['entities_id'] = $item->isEntityAssign() ? $item->getEntityID() : 0; //update data $container = new self();