From 79acd3c5421ee8615074ba231d7e710a9afb5cd4 Mon Sep 17 00:00:00 2001
From: Erwan Rouchet <rouchet@teklia.com>
Date: Tue, 19 Oct 2021 11:51:24 +0200
Subject: [PATCH] Ensure RetrieveElement is called from the DetailsPanel for
 classifications

---
 vue/Element/DetailsPanel.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/vue/Element/DetailsPanel.vue b/vue/Element/DetailsPanel.vue
index 02a02a18f..aac1225d9 100644
--- a/vue/Element/DetailsPanel.vue
+++ b/vue/Element/DetailsPanel.vue
@@ -286,11 +286,12 @@ export default {
         if (!id) return
         /*
          * Do not retrieve the element again if it already exists in the store,
-         * unless it lacks the `rights` attribute: this attribute is only available from RetrieveElement,
-         * and some elements in the store can come from list endpoints such as those of the children tree.
-         * This ensures there are no strange behaviors where some actions are only sometimes disabled when they shouldn't.
+         * unless it lacks some of the attributes only available from RetrieveElement.
+         * Some elements in the store can come from list endpoints such as those of the children tree.
+         * This ensures there are no strange behaviors where some actions are only sometimes disabled when they shouldn't,
+         * or some element attributes are not displayed at all.
          */
-        if (this.element?.id !== id || !this.element?.rights) this.$store.dispatch('elements/get', { id })
+        if (!this.element || this.element.id !== id || !this.element.rights || !this.element.classifications) this.$store.dispatch('elements/get', { id })
       }
     },
     elementType: {
-- 
GitLab