This commit provides a bulletproof solution for certificate download URLs that works even when WordPress rewrite rules fail.
## The Problem
Certificate URLs (/hvac-certificate/{token}/) were returning 404 errors because WordPress rewrite rules weren't being properly recognized, despite multiple attempts to flush them.
## The Solution
Implemented a parse_request hook that intercepts certificate URLs before WordPress handles routing. This approach:
- Works immediately without needing rewrite rule flushes
- Bypasses WordPress rewrite rule system entirely
- Catches certificate URLs early in the request lifecycle
- Provides same security and functionality as rewrite rules
## Technical Implementation
1. Added parse_request hook with priority 1 in Certificate Security class
2. Uses regex to detect /hvac-certificate/{token}/ pattern in REQUEST_URI
3. Validates token and serves certificate file directly
4. Exits after serving to prevent WordPress 404 handling
## Testing Results
✅ Direct certificate URL test shows handler is working
✅ Invalid tokens show 'Invalid or expired certificate download link'
✅ URLs are intercepted before WordPress 404 handling
## User Action Required
The certificate URL handling is now working. If certificates still don't download:
1. The download tokens may have expired (1 hour limit)
2. Certificate files may be missing from the server
3. New certificates need to be generated with working URLs
Users should:
- Generate new certificates to get fresh download tokens
- Check that certificate files exist in wp-content/uploads/hvac-certificates/
- Ensure .htaccess file exists in certificate directory for security
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| docs | ||
| memory-bank | ||
| wordpress-dev | ||
| .gitattributes | ||
| .gitignore | ||
| .roomodes | ||
| CLAUDE.md | ||
| README.md | ||
Network Events
Status: Active/Authoritative Last Updated: March 12, 2025 Scope: Main project documentation
A specialized community events platform for trainers using The Events Calendar suite.
Description
Network Events is a WordPress plugin that extends The Events Calendar suite to create a specialized platform for trainers. It provides a custom user role for trainers, registration and login forms, a trainer dashboard, and event management capabilities.
Features
- Custom user role for HVAC trainers
- Trainer registration and login
- Trainer dashboard
- Event creation and management
- Event summary and reporting
- Attendee management
- Email communication with attendees
- Integration with The Events Calendar suite
Requirements
WordPress Environment
- WordPress 5.9 or higher
- PHP 7.4 or higher
Required Plugins (Pre-installed on Production)
All required plugins are automatically synced from production during development environment setup:
-
The Events Calendar Suite:
- The Events Calendar (6.10.2+)
- Events Calendar Pro (7.4.2+)
- Event Tickets (5.19.3+)
- Event Tickets Plus (6.2.0+)
- Community Events (4.10.0+)
-
Additional Plugins (present on the Upskill HVAC Website):
- Spectra Pro (2.0.0+)
- Premium Starter Templates (4.4.14+)
- Essential Blocks (5.3.2+)
License
Copyright (c) 2025 Teal Maker Consulting
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. You may NOT assume that you can use any other version of the GPL.
Credits
Developed by Teal Maker Consulting