From dd0c9401b38feec1e3f1e07bb601222710e21bb7 Mon Sep 17 00:00:00 2001 From: pkamps Date: Wed, 16 Jan 2019 13:18:22 +0100 Subject: [PATCH] EZP-29723: Content object attributes not set properly (#130) --- kernel/classes/datatypes/ezimage/ezimagetype.php | 1 + kernel/content/attribute_edit.php | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/classes/datatypes/ezimage/ezimagetype.php b/kernel/classes/datatypes/ezimage/ezimagetype.php index 0ce5a28badc..641256df517 100644 --- a/kernel/classes/datatypes/ezimage/ezimagetype.php +++ b/kernel/classes/datatypes/ezimage/ezimagetype.php @@ -192,6 +192,7 @@ function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null ) $imageHandler->setAttribute( 'alternative_text', false ); $imageHandler->removeAliases(); $imageHandler->store( $contentObjectAttribute ); + $contentObjectAttribute->setContent( null ); } } diff --git a/kernel/content/attribute_edit.php b/kernel/content/attribute_edit.php index dcdcd8c6914..f6dfb512ead 100644 --- a/kernel/content/attribute_edit.php +++ b/kernel/content/attribute_edit.php @@ -334,10 +334,6 @@ $db->begin(); $object->setName( $class->contentObjectName( $object, $version->attribute( 'version' ), $EditLanguage ), $version->attribute( 'version' ), $EditLanguage ); $db->commit(); - - // While being fetched, attributes might have been modified. - // The list needs to be refreshed so it is accurately displayed. - $contentObjectAttributes = $version->contentObjectAttributes( $EditLanguage ); } elseif ( $storingAllowed ) {