Files
xamxam/TODO.md
Pontoporeia fb752f5ba2 cleanup: remove _write guard — FilePond external API doesn't expose _write
ro=['fire','_read','_write'] is an exclusion list in Ee(), not an inclusion
list. The external pond object has none of these. The only safe interception
point is inside the closure (vendor patch), but the root-cause fix
(fileValidateSizeFilter .filename → .name) already prevents the crash.
2026-06-10 00:18:49 +02:00

1.9 KiB

TODO

HTMX v2 Migration

Reference: docs/autosave-system.md → "HTMX v2 Migration Plan" section.

  • contenus-edit.php (pages): Add hx-* attrs, add overtype:change dispatch in OverType onChange
  • contenus-edit.php (form_help): Add hx-* attrs, add overtype:change dispatch in OverType onChange
  • apropos-groups-form.php (contacts): Add hx-* attrs only
  • contenus-edit.php (sidebar_links): Add hx-* attrs only
  • Add handleAutosaveResponse() shared handler + htmx:beforeRequest loading state
  • Delete autosave.js
  • Fix backend $isAjax detection: also recognize HX-Request header (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 crash on TFE upload forms

  • Analyze root cause → docs/filepond-crash-analysis.md
  • Partial fixes (Content-Type headers, onerror cleanup, load object) — insufficient, crash still reproduces
  • HTMX/destroy race hypothesis investigation → docs/filepond-race-investigation.md (verdict: REFUTED)
  • Diagnostic probes + deep analysis: confirmed load-file-error dispatch path, traced via error.stack to fileValidateSizeFilter line 389
  • ROOT CAUSE FIXED: fileValidateSizeFilter accessed item.filename but FileValidateSize's LOAD_FILE filter passes the raw File/Blob (which has .name, not .filename). Changed to item.filename || item.name. Also added null guard to getExt().
  • Defensive: Wt and Fr crash guards in filepond.min.js prevent action.status.main crash
  • process.onload: replaced throw with error-marker return (prevents FilePond crash when server returns HTML)
  • Routing: partage index.php now routes /partage/actions/* directly to PHP files (was treating 'actions' as a slug and returning full HTML page)
  • All crashes resolved — verified working on partage form