From 2ace78b6696164f0932ebe39316fc3ce8c68add8 Mon Sep 17 00:00:00 2001 From: josh Date: Thu, 12 Nov 2026 13:44:39 -0500 Subject: [PATCH] Submit browser migration batches to the form URL --- assets/migration.js | 4 +++- burn-events.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/migration.js b/assets/migration.js index a497675..c482f6f 100644 --- a/assets/migration.js +++ b/assets/migration.js @@ -1,6 +1,8 @@ (() => { const form = document.querySelector('[data-be-migrate]'); if (!form) return; + // The hidden WordPress action input shadows the form.action property. + const endpoint = form.getAttribute('action'); const {__, sprintf} = wp.i18n; const button = form.querySelector('button[type="submit"]'); @@ -14,7 +16,7 @@ async function requestBatch(body) { for (let attempt = 0; ; attempt++) { - const response = await fetch(form.action, { + const response = await fetch(endpoint, { method: 'POST', body, credentials: 'same-origin', headers: {Accept: 'application/json'}, }).catch(() => null); if (response && (attempt === 2 || !retryableStatuses.has(response.status))) return response; diff --git a/burn-events.php b/burn-events.php index 968388e..f81c3d5 100644 --- a/burn-events.php +++ b/burn-events.php @@ -3,7 +3,7 @@ * Plugin Name: eventLabs * Plugin URI: https://git.labs.casa/josh/eventLabs * Description: Calendars, recurring events, community submissions, and a Single Event template builder for Elementor. - * Version: 0.5.3 + * Version: 0.5.4 * Requires at least: 6.9 * Requires PHP: 8.1 * Author: hostLabs @@ -16,7 +16,7 @@ declare(strict_types=1); defined( 'ABSPATH' ) || exit; define( 'BURN_EVENTS_FILE', __FILE__ ); -define( 'BURN_EVENTS_VERSION', '0.5.3' ); +define( 'BURN_EVENTS_VERSION', '0.5.4' ); foreach ( [ 'schedule', 'maps', 'events', 'admin', 'map-view', 'calendar-grid', 'calendar', 'community', 'transfer', 'single-event-templates', 'api', 'burnworks', 'clubs', 'legacy-migration', 'updates', 'platform' ] as $module ) { require_once __DIR__ . '/includes/class-' . $module . '.php';