# Deprecated Files - HVAC Community Events Plugin

**Date:** January 2025
**Reason:** Replaced by comprehensive event creation system in v3.2.0

## Overview

The following files have been deprecated and replaced by the new comprehensive event creation system centered around `page-tec-create-event.php` and the `HVAC_Event_Form_Builder` class. The new system provides:

- Native Events Calendar integration
- AI-powered event population
- Template system with auto-save
- Dynamic searchable selectors
- Modal creation forms
- Featured image support
- Advanced role-based permissions
- Modern responsive design

## Deprecated Template Files

### Event Creation Templates

**File:** `templates/page-create-event.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** `templates/page-tec-create-event.php`
**Reason:** Legacy REST API-based form, replaced by native TEC integration with AI assistance

**File:** `templates/page-manage-event.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** `templates/page-tec-create-event.php` + WordPress admin panels
**Reason:** Management functionality moved to standard WordPress admin with enhanced create form

**File:** `templates/page-edit-event.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** `templates/page-tec-edit-event.php`
**Reason:** Updated with TEC native integration and improved UX

**File:** `templates/page-edit-event-custom.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** `templates/page-tec-edit-event.php`
**Reason:** Custom implementation replaced by standardized TEC approach

**File:** `templates/page-manage-event-integrated.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** WordPress admin + enhanced create form
**Reason:** Management moved to admin interface, creation enhanced with AI

**File:** `templates/community-edit-event-prototype.php`
**Status:** ⛔ DEPRECATED
**Replaced By:** `templates/page-tec-edit-event.php`
**Reason:** Prototype replaced by production implementation

## Deprecated JavaScript Files

**File:** `assets/js/hvac-event-form-templates.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** `assets/js/hvac-ai-assist.js` + template system in form builder
**Reason:** Template functionality integrated into main AI assistant system

## Deprecated CSS Files

**File:** `assets/css/hvac-event-form-templates.css`
**Status:** ⛔ DEPRECATED
**Replaced By:** Integrated styling in main form builder CSS
**Reason:** Styling consolidated into main event creation stylesheets

## Deprecated Test Files

**File:** `test-manage-event-form.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** `test-master-trainer-e2e.js` + `test-comprehensive-validation.js`
**Reason:** Old form tests replaced by comprehensive E2E testing framework

**File:** `test-edit-event-debug.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** New E2E test framework
**Reason:** Debug tests replaced by systematic testing approach

**File:** `test-edit-event-page.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** `test-comprehensive-validation.js`
**Reason:** Individual page tests consolidated into comprehensive suite

**File:** `test-manage-event-fixes.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** Modern test framework
**Reason:** Fix-specific tests replaced by regression testing

**File:** `test-final-manage-event.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** `test-master-trainer-e2e.js`
**Reason:** Final tests replaced by comprehensive E2E coverage

**File:** `test-create-and-edit-event.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** `test-comprehensive-validation.js`
**Reason:** Combined tests split into focused, comprehensive suites

**File:** `test-create-and-edit-events.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** Modern E2E test framework
**Reason:** Legacy testing approach replaced by POM-based testing

**File:** `test-create-event-after-fix.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** Comprehensive test coverage
**Reason:** Fix-specific tests replaced by regression prevention

## Deprecated Utility Scripts

**File:** `fix-manage-event-shortcode.sh`
**Status:** ⛔ DEPRECATED
**Replaced By:** N/A (shortcode system removed)
**Reason:** Shortcode approach replaced by native WordPress page templates

**File:** `create-event-pages-fixed.sh`
**Status:** ⛔ DEPRECATED
**Replaced By:** Page setup handled by plugin activation
**Reason:** Manual page creation replaced by automated setup

**File:** `debug-create-event-404.js`
**Status:** ⛔ DEPRECATED
**Replaced By:** Comprehensive error handling in new system
**Reason:** 404 issues resolved by proper URL structure implementation

**File:** `scripts/clear-manage-event-cache.sh`
**Status:** ⛔ DEPRECATED
**Replaced By:** Automated cache management
**Reason:** Manual cache clearing replaced by intelligent cache invalidation

## Migration Notes

### For Developers

1. **Template Usage:** Update any custom code to reference `page-tec-create-event.php`
2. **JavaScript Dependencies:** Replace references to old JS files with new AI-assist system
3. **CSS Classes:** Update any custom CSS to work with new form builder classes
4. **Testing:** Migrate any custom tests to use the new E2E framework

### For Users

- **No Action Required:** All functionality has been migrated automatically
- **Enhanced Features:** Users gain access to AI assistance, templates, and improved UX
- **Existing Events:** All existing events remain unchanged and fully functional

### For System Administrators

1. **File Cleanup:** These deprecated files can be safely removed after v3.2.0 deployment
2. **Cache Clearing:** Clear any page caches after deployment
3. **User Training:** Inform users about new AI assistance and template features

## Replacement Timeline

- **v3.0:** New system introduced alongside legacy system
- **v3.1:** New system became primary, legacy marked deprecated
- **v3.2:** Legacy system fully deprecated, comprehensive documentation created
- **v3.3:** (Planned) Legacy files removed from codebase

## Technical Details

### New System Benefits

1. **Native TEC Integration:** Direct Events Calendar compatibility
2. **AI Assistance:** Intelligent form population from URLs and text
3. **Template System:** Reusable event templates with categories
4. **Modern UX:** Responsive design with progressive disclosure
5. **Enhanced Security:** Comprehensive nonce verification and input sanitization
6. **Performance:** Optimized AJAX requests with client-side caching
7. **Accessibility:** Full WCAG compliance and keyboard navigation

### API Changes

- **REST API Dependency Removed:** Direct WordPress/TEC integration
- **AJAX Endpoints Consolidated:** Centralized in `HVAC_Ajax_Handlers`
- **Security Enhanced:** Role-based permissions with capability checking
- **Error Handling Improved:** Structured error responses with user feedback

---

**Last Updated:** January 2025
**Reviewed By:** HVAC Development Team
**Next Review:** July 2025

## Actions Required

1. ✅ **Create comprehensive documentation** (completed)
2. ✅ **Mark files as deprecated** (in progress)
3. 🔄 **Update references in documentation**
4. 📅 **Schedule file removal for v3.3**
5. 📅 **Plan user communication about changes**

---

*This deprecation notice ensures proper transition to the new comprehensive event creation system while maintaining backward compatibility during the transition period.*