mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
fix(production): fix multiple remote server errors from nginx logs
- Fix 413 Request Entity Too Large: bump client_max_body_size to 256M, PHP post_max_size/upload_max_filesize to 256M, fastcgi timeouts to 300s - Fix missing v_smtp_active view: add IF NOT EXISTS to all CREATE VIEW statements in schema.sql for idempotent migrates - Fix bars.svg 404: create animated SVG spinner in app/public/assets/img/ - Fix nginx rate limiting: increase admin zone from 60r/m (1 r/s) to 300r/m (5 r/s) with burst=30 to handle ~11 concurrent HTMX fragment GETs on contenus.php page load - Add deploy-nginx recipe to justfile for uploading nginx config to server - Database readonly issue mitigated by existing --chown + deploy-server.sh permissions fix - Add comprehensive PHP/JS debugging logs for settings checkboxes: per-field raw POST values in error_log, console.log on htmx:beforeSend, htmx:sendError, htmx:afterRequest, toast lifecycle - Fix toast auto-remove script: use getElementById with unique ID instead of querySelector which could remove wrong toast on rapid clicks
This commit is contained in:
@@ -740,6 +740,19 @@
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: rxpvwzkt 7fac18bc "feat(admin): add htmx toast feedback for settings checkboxes in contenus.php" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: rxpvwzkt 7fac18bc "feat(admin): add htmx toast feedback for settings checkboxes in contenus.php" (rebased revision)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
- $linkName = $link['name'] ?? '';
|
||||
- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: pqnovwxx 48308820 "fix(production): fix multiple remote server errors from nginx logs" (rebased revision)
|
||||
$linkName = $link['name'] ?? '';
|
||||
$linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
$linkLockedYear = $link['locked_year'] ?? null;
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: pqnovwxx eb519770 "fix(production): fix multiple remote server errors from nginx logs" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
?>
|
||||
<tr class="admin-table-row" onclick="event.stopPropagation(); window.open('/partage/<?= urlencode($link['slug']) ?>', '_blank')" style="cursor:pointer">
|
||||
|
||||
@@ -99,7 +99,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#restrictions-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-restrictions">
|
||||
hx-include="#fieldset-restrictions"
|
||||
hx-on::before-request="console.log('[restrictions] sending checked=' + this.checked + ' POST keys will include all #fieldset-restrictions inputs')"
|
||||
hx-on::after-request="console.log('[restrictions] response received')">
|
||||
<span>
|
||||
<strong>Activer la restriction d'accès</strong><br>
|
||||
<small>Pour les TFE de type "Interne", masquer les fichiers et exiger une demande d'accès par email. Les métadonnées et le résumé restent visibles publiquement.</small>
|
||||
@@ -125,7 +127,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#acces-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-acces">
|
||||
hx-include="#fieldset-acces"
|
||||
hx-on::before-request="console.log('[acces-libre] sending checked=' + this.checked)"
|
||||
hx-on::after-request="console.log('[acces-libre] response received')">
|
||||
<span>
|
||||
<strong>Libre</strong><br>
|
||||
<small>Libre accès — TFE accessible publiquement sur la plateforme et en bibliothèque</small>
|
||||
@@ -139,7 +143,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#acces-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-acces">
|
||||
hx-include="#fieldset-acces"
|
||||
hx-on::before-request="console.log('[acces-interne] sending checked=' + this.checked)"
|
||||
hx-on::after-request="console.log('[acces-interne] response received')">
|
||||
<span>
|
||||
<strong>Interne</strong><br>
|
||||
<small>TFE accessible uniquement sur place en physique</small>
|
||||
@@ -153,7 +159,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#acces-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-acces">
|
||||
hx-include="#fieldset-acces"
|
||||
hx-on::before-request="console.log('[acces-interdit] sending checked=' + this.checked)"
|
||||
hx-on::after-request="console.log('[acces-interdit] response received')">
|
||||
<span>
|
||||
<strong>Interdit</strong><br>
|
||||
<small>TFE non disponible en physique ni sur le site</small>
|
||||
@@ -188,7 +196,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#types-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-types">
|
||||
hx-include="#fieldset-types"
|
||||
hx-on::before-request="console.log('[types-these] sending checked=' + this.checked)"
|
||||
hx-on::after-request="console.log('[types-these] response received')">
|
||||
<span>
|
||||
<strong>Thèse</strong><br>
|
||||
<small>Thèses doctorales</small>
|
||||
@@ -202,7 +212,9 @@
|
||||
hx-trigger="change"
|
||||
hx-target="#types-response"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#fieldset-types">
|
||||
hx-include="#fieldset-types"
|
||||
hx-on::before-request="console.log('[types-frart] sending checked=' + this.checked)"
|
||||
hx-on::after-request="console.log('[types-frart] response received')">
|
||||
<span>
|
||||
<strong>Frart</strong><br>
|
||||
<small>Formation de recherche en art</small>
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
<?php endif; ?>
|
||||
<script src="/assets/js/htmx.min.js"></script>
|
||||
<script>
|
||||
// Global HTMX debugging for settings checkboxes
|
||||
document.body.addEventListener('htmx:sendError', function (e) {
|
||||
console.error('[htmx:sendError] target=', e.target.id, 'detail=', e.detail);
|
||||
});
|
||||
document.body.addEventListener('htmx:beforeSend', function (e) {
|
||||
if (e.target.id && (e.target.id.includes('fieldset-') || e.target.name)) {
|
||||
console.log('[htmx:beforeSend] name=' + e.target.name + ' checked=' + e.target.checked, 'formData keys:', Array.from(new FormData(e.target.closest('fieldset'))).map(function(kv){return kv[0]}));
|
||||
}
|
||||
});
|
||||
document.body.addEventListener('htmx:afterSettle', function (e) {
|
||||
if (e.target && e.target.id === 'toast-region') {
|
||||
var warn = e.target.querySelector('.toast--warning');
|
||||
|
||||
Reference in New Issue
Block a user