Files
xamxam/TODO.md
Pontoporeia cab65ea4a4 fix: jury-fieldset.php calling old() with wrong signature for partage
jury-fieldset.php called old('jury_promoteur') as a global function,
but the partage context defines old(array $data, string $key) —
passing a string where array is expected caused a TypeError.

Changed jury-fieldset.php to use $oldFn callable (like fieldset-tfe-info.php),
with fallback to global old() when not provided. The add-mode repopulation
block no longer calls the global old() directly.
2026-05-19 00:08:06 +02:00

5.3 KiB

TODO

  • Improve recapitulatif.php (partage): bottom margin/padding, center .thanks-success

  • Display ALL submitted info in recapitulatif page + email recap

  • Add "validate your info / contact xamxam@erg.be" note on recap page

  • Fix CSV import: lecteur interne/externe + promoteurice ULB not imported with correct role/is_external/is_ulb flags

  • Replace HTMX+PHP file upload queues with client-side JS

  • Fix submit button on all forms — add JS/PHP debug logging

    • Fix file-upload-queue.js: redirect detection broken due to opaque redirect (switched from fetch to XHR for reliable responseURL)
    • Add console.log tracing on JS submit interception
    • Add error_log entry-point logging to all 16 PHP action files
    • Add double-submit guard (_xamxamActiveSubmit)
  • Fix spurious HTMX console warnings from checkbox-list default hx-include

  • Fix duplicate language entries (accented vs non-accented variants)

  • Fix checkbox click in admin index navigating to recapitulatif instead of toggling

    • Deduplicate getPredefinedLanguages() query
    • Accent-tolerant getOrCreateLanguage() to prevent future duplicates
    • Delete orphan non-accented language rows from DB
  • Migrate file upload queues to FilePond

    • Download filepond.min.js + filepond.min.css as local assets
    • Create file-upload-filepond.js (init script for FilePond instances)
    • Rewrite fichiers-fragment.php: replace custom picker/queue DOM with FilePond targets
    • Rewrite fieldset-files.php: same migration (dead code but kept consistent)
    • Update admin/add.php, admin/edit.php, partage/index.php: swap sortable+file-upload-queue for filepond
    • Remove file-upload-queue.js and sortable.min.js
    • Clean up CSS: remove .fq-*, .tfe-file-queue styles, add filepond.css + theme overrides
    • Decouple format extras from main file inputs — slot-based HTMX swaps preserve FilePond instances
    • Fix initFilePonds → window.XamxamInitFilePonds bug
    • Verify backend $_FILES['queue_file'][*] data flow unchanged
    • Add FilePond pools for couverture + note_intention (extracted from file-field.php inner )
    • Fix video/audio pools: allowMultiple: true, not single-file
    • Add QUEUE_CONFIG for cover (20MB single) and note_intention (100MB PDF single)
  • Disable dedicated video/audio upload slots — video/audio files now go through TFE FilePond input

    • Comment out slot-video and slot-audio in fichiers-fragment.php (keep code, render always-hidden)
    • Remove HTMX swap triggers from Vidéo/Audio checkboxes
    • Clean up slot-video/slot-audio from file-upload-filepond.js beforeSwap handler
    • Fix missing endif after removing elseif chain (parse error)
  • Fix annexe validation error + FilePond type validation + styling

    • Make annexe pool always visible (remove checkbox+HTMX swap, always on, optional)
    • Remove mandatory annexe file validation from ThesisCreateController
    • Add extension-based file type validation in beforeAddFile (needed because storeAsFile: true skips FilePond MIME detection)
    • Fix FilePond dark theme: override item/file colors, buttons, progress indicator to match site theme
    • Add drag-over highlight style for drop area
  • FilePond production hardening

    • Fix beforeAddFile return format: return true/false, not {status, main, sub} (FilePond API contract)
    • Replace manual validation with FilePond plugins: FileValidateType, FileValidateSize
    • Download FilePond plugin assets: file-validate-type, file-validate-size, image-preview, image-exif-orientation
    • Add order serialization: hidden inputs (queue_order[type]) synced from pond.getFiles()
    • Fix HTMX cleanup: generic destroyFilePondsIn(target) for all beforeSwap events, not just known IDs
    • Fix duplicate initialization: use FilePond.find(input) instead of dataset checks
    • Centralize validation config in QUEUE_CONFIG (acceptedFileTypes, maxFileSize per type)
    • Add per-extension size limits for TFE queue (PDF=100MB, video/audio=2GB, default 500MB)
    • Add comprehensive French labels (labelFileProcessing, labelTapToCancel, etc.)
    • Register plugins on all entrypoints (admin/add, admin/edit, partage/index)
    • Remove duplicate init scripts from fichiers-fragment.php
    • Server-side MIME verification already in place (finfo-based validation in ThesisFileHandler)
  • Fix undefined $isExternalUrl and disable PeerTube in tfe.php

  • Fix migration 028: drop banner_path from theses (handle dependent view)

    • Create ensure-db.php to init fresh DB from schema.sql when missing
    • Remove broken 027_drop_banner_path.sql, move 025 to applied
    • Move stray 021_peertube_settings.sql to applied/
    • Update deploy justfile to run ensure-db.php before migrations
  • Fix promoteurice array repopulation in partage form

    • Fix old() to return raw arrays (not json_encode) for repopulation
    • Handle jury_promoteur[] and jury_promoteur_ulb_name[] as arrays in partage/index.php
  • Make Auteur(s) and Accès columns sortable alphabetically in admin list

  • Merge both .recap-section sections into one + add margin-bottom: var(--space-l)

  • Fix Fatal error: old() type error in jury-fieldset.php — switch from global old() to $oldFn callable