From 71d25e202390ddc2bc46de4ea57b3cbe882f7949 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 11 Aug 2025 19:42:30 -0300 Subject: [PATCH] fix: correct TEC shortcode format for event editing form population MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update includes/class-hvac-shortcodes.php:277 to use [tribe_community_events view="submission_form"] - Update templates/page-manage-event.php:83 to use correct TEC shortcode format - Fixes issue where event edit forms appeared blank instead of populated with existing data - TEC submission_form view automatically detects event_id URL parameters for editing - Enables proper event creation and editing functionality for trainers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- includes/class-hvac-shortcodes.php | 5 +++-- templates/page-manage-event.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/class-hvac-shortcodes.php b/includes/class-hvac-shortcodes.php index b7bf75a5..7a224f17 100644 --- a/includes/class-hvac-shortcodes.php +++ b/includes/class-hvac-shortcodes.php @@ -272,8 +272,9 @@ class HVAC_Shortcodes { return '

' . __('Event management requires The Events Calendar Community Events add-on.', 'hvac-community-events') . '

'; } - // Return the tribe shortcode - return '[tribe_community_events]'; + // Return the tribe shortcode with view parameter for submission form + // This enables both new event creation and existing event editing + return '[tribe_community_events view="submission_form"]'; } /** diff --git a/templates/page-manage-event.php b/templates/page-manage-event.php index cc996a6f..b765b15a 100644 --- a/templates/page-manage-event.php +++ b/templates/page-manage-event.php @@ -79,8 +79,8 @@ get_header(); echo do_shortcode($raw_content); endwhile; else: - // Fallback - show the shortcode directly - echo do_shortcode('[tribe_community_events]'); + // Fallback - show the shortcode directly with submission form view + echo do_shortcode('[tribe_community_events view="submission_form"]'); endif; ?>