diff --git a/includes/class-hvac-manage-event.php b/includes/class-hvac-manage-event.php index fe424247..305df12d 100644 --- a/includes/class-hvac-manage-event.php +++ b/includes/class-hvac-manage-event.php @@ -18,8 +18,8 @@ class HVAC_Manage_Event { * Constructor */ public function __construct() { - // Hook into content filter with low priority (99) to run after other filters - add_filter('the_content', array($this, 'ensure_shortcode_processing'), 99); + // DISABLED: Content filtering is now handled directly in the template + // add_filter('the_content', array($this, 'ensure_shortcode_processing'), 99); // Add authentication check for manage-event page add_action('template_redirect', array($this, 'check_manage_event_auth')); @@ -67,9 +67,15 @@ class HVAC_Manage_Event { HVAC_Logger::info('Original content: ' . substr($content, 0, 200), 'ManageEvent'); } - // Strip WordPress block editor comments - $content = preg_replace('//', '', $content); - $content = preg_replace('//', '', $content); + // Strip WordPress block editor comments - handle all variations + $content = preg_replace('//', '', $content); + $content = preg_replace('//', '', $content); + + // Also strip any remaining HTML comments that might contain shortcode references + $content = preg_replace('//', '', $content); + + // Clean up any extra whitespace + $content = trim($content); // Process all shortcodes in the content $processed_content = do_shortcode($content); @@ -245,7 +251,41 @@ class HVAC_Manage_Event { .hvac-notice.hvac-error ul { margin: 15px 0 15px 30px; } - '; + + '; } /** diff --git a/scripts/clear-manage-event-cache.sh b/scripts/clear-manage-event-cache.sh new file mode 100755 index 00000000..05aa9933 --- /dev/null +++ b/scripts/clear-manage-event-cache.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +echo "=== Clearing cache for manage event page ===" + +# Try to clear Breeze cache if available +if command -v wp &> /dev/null; then + echo "Clearing WordPress cache..." + wp cache flush 2>/dev/null || echo " - WordPress cache flush not available" + + echo "Clearing Breeze cache..." + wp breeze purge --cache=all 2>/dev/null || echo " - Breeze cache purge not available" + + echo "Clearing transients..." + wp transient delete --all 2>/dev/null || echo " - Transient deletion not available" +else + echo "WP-CLI not found. Manual cache clearing may be needed." +fi + +# Clear object cache files if they exist +if [ -d "/tmp/breeze" ]; then + echo "Clearing Breeze file cache..." + rm -rf /tmp/breeze/* +fi + +# Clear any server-side caches +if command -v redis-cli &> /dev/null; then + echo "Flushing Redis cache..." + redis-cli FLUSHALL 2>/dev/null || echo " - Redis flush failed or not configured" +fi + +if command -v service &> /dev/null; then + echo "Restarting PHP-FPM (if available)..." + sudo service php*-fpm restart 2>/dev/null || echo " - PHP-FPM restart not available" +fi + +echo "Cache clearing complete!" +echo "" +echo "Next steps:" +echo "1. Visit the manage event page in an incognito/private browser window" +echo "2. Check if the HTML comment is still appearing" +echo "3. If it still appears, the issue is likely in The Events Calendar plugin itself" \ No newline at end of file diff --git a/templates/page-manage-event.php b/templates/page-manage-event.php index c72d8a9e..7bd33741 100644 --- a/templates/page-manage-event.php +++ b/templates/page-manage-event.php @@ -10,12 +10,50 @@ get_header(); // This template ensures proper WordPress theme integration ?>