This commit provides a comprehensive fix for the certificate download 404 errors:
## Problem
Certificate URLs (/hvac-certificate/{token}/) were returning 404 errors even after deployment because WordPress rewrite rules weren't properly registered or flushed.
## Solutions Implemented
### 1. Enhanced Plugin Activation
- Certificate security class is now initialized BEFORE flushing rewrite rules during activation
- This ensures the custom rewrite rule 'hvac-certificate/([^/]+)/?$' is registered
- Activation now properly adds the rule and flushes to make it active
### 2. Added Certificate Fix Admin Page
- New diagnostics page at /certificate-fix/ (admin only)
- Shows certificate system status including:
- Database table status and counts
- Certificate file directory status
- Recent certificate activity
- Includes 'Flush Rewrite Rules' button for manual fixing
- Provides direct test link for rewrite rule verification
### 3. Rewrite Rules Test Tool
- Added test script accessible at /wp-admin/admin.php?test_certificate_rewrite=1
- Shows whether certificate rewrite rules are registered
- Verifies query vars are properly set
- Can manually add and flush rules if missing
### 4. Manual Flush Capability
- Admins can trigger flush via /wp-admin/?hvac_flush_rewrite=1
- Useful for debugging without accessing Certificate Fix page
## User Instructions
If certificate URLs still return 404:
1. Go to /certificate-fix/ page
2. Click 'Flush Rewrite Rules' button
3. Test certificate viewing again
The certificate download system uses secure token-based URLs that expire after 1 hour for security. These URLs must be properly registered with WordPress rewrite rules to function.
🤖 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