diff --git a/CHANGELOG.md b/CHANGELOG.md index 255f7435..acb543d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] +### Fixed + +- Fix container update from other context (like plugins) ## [1.21.19] - 2025-02-03 +### Fixed + - Fix container update from `API` - Fix: fix default value for `dropdown` field to avoid empty dropdown ## [1.21.18] - 2024-01-16 +### Fixed + - Fix `PluginFieldsContainerDisplayCondition` display when value is no more available. - Fix issue where the value of custom fields could not be saved diff --git a/inc/container.class.php b/inc/container.class.php index 9c0e67f5..ff7f8bd0 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1664,10 +1664,10 @@ public static function preItemUpdate(CommonDBTM $item) public static function preItem(CommonDBTM $item) { //find container (if not exist, do nothing) - if (isset($_REQUEST['c_id'])) { - $c_id = $_REQUEST['c_id']; - } elseif (isset($item->input['c_id'])) { + if (isset($item->input['c_id'])) { $c_id = $item->input['c_id']; + } elseif (isset($_REQUEST['c_id'])) { + $c_id = $_REQUEST['c_id']; } else { $type = 'dom'; if (isset($_REQUEST['_plugin_fields_type'])) {