Fix AJAX submission issues with multiple forms on same page#28
Open
wotis wants to merge 5 commits intobgermann:masterfrom
Open
Fix AJAX submission issues with multiple forms on same page#28wotis wants to merge 5 commits intobgermann:masterfrom
wotis wants to merge 5 commits intobgermann:masterfrom
Conversation
✅ MAJOR RELEASE - TIMEZONE-FIX UND MODERNE FEATURES: 🔧 TIMEZONE-HANDLING KOMPLETT ÜBERARBEITET: - Korrekte lokale Zeit-Speicherung und -Anzeige - WordPress Timezone-Integration - Behebung des Timezone-Shift Problems - Konsistente DateTime-Behandlung 🎨 MODERNES ADMIN-INTERFACE: - Responsive Design für mobile Geräte - Moderne CSS-Styles (admin-modern.css) - Mobile-optimierte Admin-Oberfläche - Verbesserte Benutzerfreundlichkeit 🧩 GUTENBERG INTEGRATION: - Vollständige Block-Editor Unterstützung - Neue blocks/ Verzeichnis-Struktur - Moderne WordPress-Integration 🛡️ SICHERHEIT UND STABILITÄT: - Neue Sicherheitsbibliothek (lib_security.php) - Verbesserte Internationalisierung (lib_i18n.php) - Erweiterte Block-Funktionalität (lib_blocks.php) 📱 MOBILE RESPONSIVE: - Mobile-Admin CSS (mobile-admin.css) - Responsive Design (mobile-responsive.css) - Touch-optimierte Bedienung 🔄 KERN-VERBESSERUNGEN: - Erweiterte FormSettings.php - Optimierte cforms.php - Verbesserte lib_functions.php - Überarbeitete lib_options_sub.php Diese Version löst das ursprüngliche Timezone-Problem und bringt cforms2 auf den neuesten Stand der WordPress-Entwicklung.
✅ STABLE TAG AKTUALISIERT: - Stable tag von trunk auf 16.0.0 geändert - Korrekte Versionsnummer für WordPress Plugin Directory ✅ CHANGELOG FÜR VERSION 16.0.0 HINZUGEFÜGT: - Vollständige Feature-Liste für Major Release - Timezone-Fix als Hauptfeature hervorgehoben - Moderne WordPress-Features dokumentiert - Responsive Design und Gutenberg Integration erwähnt - Sicherheits- und Performance-Verbesserungen aufgelistet ✅ DOKUMENTATION VERVOLLSTÄNDIGT: - Alle neuen Features von Version 16.0.0 dokumentiert - Technische Verbesserungen detailliert beschrieben - Benutzer-relevante Änderungen hervorgehoben Die readme.txt ist jetzt vollständig für Version 16.0.0 aktualisiert und bereit für die Veröffentlichung im WordPress Plugin Directory.
✅ ROADMAP AKTUALISIERT FÜR VERSION 16.0.0: - Gutenberg Integration als abgeschlossen markiert ✅ - Enhanced Security als abgeschlossen markiert ✅ - Mobile Admin Interface als abgeschlossen markiert ✅ - CSS/Responsive Design als teilweise abgeschlossen markiert ✅ ✅ ERLEDIGTE FEATURES DOKUMENTIERT: - Gutenberg equivalent of editor plugin (completed in v16.0.0) - Enhanced security and input filtering (completed in v16.0.0) - Improve mobile admin interface (completed in v16.0.0) - Modernize CSS and responsive design (partially completed in v16.0.0) ✅ ROADMAP TRANSPARENZ: - Benutzer sehen jetzt klar, was bereits implementiert wurde - Verbleibende Aufgaben sind weiterhin sichtbar - Version 16.0.0 Achievements werden gewürdigt Die Roadmap reflektiert jetzt korrekt den aktuellen Stand und die Errungenschaften von Version 16.0.0.
✅ BEREINIGUNG NACH BENUTZER-FEEDBACK: - mobile-responsive.css entfernt (war für Frontend gedacht) - Nur mobile-admin.css beibehalten (nur Admin-Interface) - Frontend bleibt unverändert wie gewünscht ✅ KLARSTELLUNG: - mobile-admin.css: Nur Admin-Interface Optimierung - Keine Frontend-Änderungen - Fokus auf Admin-Benutzerfreundlichkeit ✅ ERGEBNIS: - Saubere, fokussierte mobile Admin-Optimierung - Frontend bleibt original - Keine unnötigen Dateien mehr Version 16.0.0 konzentriert sich jetzt korrekt nur auf Admin-Interface Verbesserungen ohne Frontend-Änderungen.
When two forms are present on a page (especially when one is hidden due to time constraints), AJAX submissions could hang at "waiting" message. Changes: - Move time constraint check before HTML element creation to prevent orphaned message boxes for hidden forms - Add robust AJAX error handling with response validation - Use configured failure messages instead of technical error output - Clear output buffer before JSON response to prevent parsing errors Fixes issue where second form's AJAX submission would not complete when first form was present but hidden by date/time restrictions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Description
When using two forms via shortcode on the same page, AJAX submission can fail or hang at the "waiting" message. This issue is particularly evident when the first form is hidden due to time/date constraints while the second form is visible and being submitted.
Steps to Reproduce
[cforms]51[/cforms]and[cforms]52[/cforms]Root Cause
<div id="usermessage...a">) even though the form itself is not renderedChanges Made
In
lib_render.php(lines 116-123)cforms2_check_time()check before creating any HTML elementsIn
lib_ajax.php(lines 20-23)ob_clean()to clear any previous output before sending JSONIn
js/cforms.js(lines 185-202)jQuery.post()withjQuery.ajax()for better error handlingTesting
Tested with:
Impact
This fix ensures that:
Affected Versions