diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c9a62c6..34ece948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix for the `COALESCE` part of the `SQL query` for `multiple` dropdowns - Fix `search option` for `multiple` dropdown - Fix display from Planning view +- Fix `classname` resolution when multiple `s` at end of container name ## [1.21.23] - 2025-08-26 diff --git a/inc/container.class.php b/inc/container.class.php index d6750d44..3968e27e 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -768,6 +768,7 @@ public static function preItemPurge($item) $itemtypes = json_decode($container['itemtypes']); if (in_array($itemtype, $itemtypes)) { $classname = 'PluginFields' . $itemtype . getSingular($container['name']); + $classname = preg_replace('/s{2}$/i', 's', $classname); // in case name ends with 'ss' remove last 's' $fields = new $classname(); $fields->deleteByCriteria(['items_id' => $item->fields['id']], true); }