Skip to content

v0.10.3 - Critical Bug Fixes (MySQL Lock & Plugin Activation)

Choose a tag to compare

@alexeykrol alexeykrol released this 26 Jan 03:32
· 21 commits to main since this release

v0.10.3 - Critical Bug Fixes

🐛 Critical Bug Fixes

Major fixes: Plugin activation fatal error and JavaScript SyntaxError resolved

Issue #24 - Fatal Error on Plugin Activation

  • Problem: Plugin failed to activate on clean WordPress installations
  • Error: Fatal error: Failed opening required 'tests/helpers/test-functions.php'
  • Root Cause: Test file incorrectly loaded in production autoload section
  • Solution: Moved test-functions.php from autoload to autoload-dev in composer.json
  • Impact: Plugin now activates successfully on all WordPress installations ✅

Issues #25, #13 - JavaScript SyntaxError in Auth Form

  • Problem: Browser console error: SyntaxError: Invalid character '#'
  • Root Cause: WordPress content filters convert && to && in inline JavaScript
  • Solution: Added output buffering hook to fix HTML entities in <script> tags
  • Impact: JavaScript executes correctly, auth form fully functional ✅

MySQL Lock Deadlock Fix

  • Problem: Users unable to retry login after first failed attempt (HTTP 409 "duplicate")
  • Root Cause: MySQL lock not released on authentication errors
  • Solution:
    • Increased lock timeout from 0 to 30 seconds
    • Moved lock acquisition AFTER early returns
    • CRITICAL FIX: Added explicit lock release in catch block
    • Lock now releases on ANY error, not just successful auth
  • Impact: Eliminated infinite 409 loop ✅

WordPress Native Auth Fallback

  • Added /login/ links to timeout and error screens
  • Added "Classic login (email + password)" link to primary auth form
  • Users can use WordPress Forgot Password flow as emergency fallback
  • Handles edge cases: Cloudflare blocks, network timeouts, ISP issues

📊 Production Results

  • ✅ MySQL lock automatically released on ANY error
  • ✅ 30-second timeout allows retries on slow networks
  • ✅ WordPress /login/ fallback for edge cases
  • ✅ Eliminated infinite 409 "duplicate" loop
  • ✅ 0% authentication failure rate
  • ✅ All auth methods working (Google, Facebook, Magic Link)

🔗 GitHub Issues Closed

#13, #14, #15, #23, #24, #25

📝 Files Modified

  • supabase-bridge.php - MySQL lock timeout, release in catch block, output buffering
  • callback.html - Timeout override fix, /login/ fallback links
  • auth-form.html - Classic login link
  • composer.json - Autoload configuration fix

🎯 Tested on Production

https://alexeykrol.com