mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 08:09:18 +02:00
Fixes three root causes of FilePond errors on TFE upload forms: 1. server.process.onerror accessed .status on a string (XHR response text body) — now extracts the body safely. 2. server.load was a bare URL string with no error handling — converted to object with onload/onerror to prevent FilePond internal _write crash when load.php returns HTTP errors. 3. destroyFilePondsIn now aborts in-flight processing before pond.destroy() to prevent stale XHR callbacks firing on a torn-down FilePond instance. Server-side: FilepondHandler now emits Content-Type: text/plain on all responses (PHP defaults to text/html on die(), confusing FilePond's response parser).
1.5 KiB
1.5 KiB
TODO
HTMX v2 Migration
Reference: docs/autosave-system.md → "HTMX v2 Migration Plan" section.
contenus-edit.php(pages): Addhx-*attrs, addovertype:changedispatch in OverTypeonChangecontenus-edit.php(form_help): Addhx-*attrs, addovertype:changedispatch in OverTypeonChangeapropos-groups-form.php(contacts): Addhx-*attrs onlycontenus-edit.php(sidebar_links): Addhx-*attrs only- Add
handleAutosaveResponse()shared handler +htmx:beforeRequestloading state - Delete
autosave.js - Fix backend
$isAjaxdetection: also recognizeHX-Requestheader (page.php, apropos.php, form-help.php) - Form-help inline editors: add OverType toolbar + HTMX auto-save + remove save buttons
- Markdown cheatsheet modal: reusable dialog on all OverType editors
FilePond error fixes
- Fix
server.process.onerror: don't accessresponse.statuson string (response is XHR text body) - Fix
server.load: convert from string URL to object with properonload/onerrorhandlers - Fix
server.process.onload: guard against non-ID responses (e.g. HTML error pages disguised as 200) - Fix
destroyFilePondsIn: abort in-flight uploads before destroying to prevent stale XHR callbacks crashing_write - Fix
FilepondHandler.php: setContent-Type: text/plainheader at top ofhandleProcess,handleLoad,handleRevert,handleRemoveso PHP doesn't default totext/htmlondie()