From 88d9e0e2b7997eb0c96dc737082c91b4e3f7ca6e Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 17 Jun 2026 15:10:37 +0000
Subject: [PATCH] =Fixed for single image upload fields populating the image meta. Need to check galleries now.

---
 assets/js/concise/CRUD.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/assets/js/concise/CRUD.js b/assets/js/concise/CRUD.js
index 3255643..599047b 100644
--- a/assets/js/concise/CRUD.js
+++ b/assets/js/concise/CRUD.js
@@ -558,7 +558,7 @@
 				}
 			}
 
-			if (event === 'sent-to-server') {
+			if (event === 'sent-to-server' && data.type === 'content_update') {
 				if (data instanceof FormData) return;
 
 				for ( let [id, changes] of Object.entries(data.posts)) {
@@ -1294,17 +1294,20 @@
 		this.ui.modals.edit.form.dataset.formId = `edit-${itemID}`;
 
 
+		this.isPopulating = true;
+
 		this.modals.edit.handleOpen();
 		this.forms.registerForm(this.ui.modals.edit.form, {cache: false,
 			autoUpload: true,});
 
 
-		this.isPopulating = true;
 		this.populate.populate(this.ui.modals.edit.form, item);
 		//For quill/taxonomy selector's async setups
 		requestAnimationFrame(() => {
 			requestAnimationFrame(() => {
-				this.isPopulating = false;
+				setTimeout(() => {
+					this.isPopulating = false;
+				}, 50);
 			});
 		});
 
@@ -1384,6 +1387,7 @@
 		let operation = {
 			endpoint: this.endpoint,
 			headers: {
+				'X-WP-Nonce': window.auth.getNonce(),
 				'X-Action-Nonce': window.auth.getNonce('dash'),
 			},
 			data: {

--
Gitblit v1.10.0