TEC Community Events Shortcode Test

"; echo "
Plugin Status Check
"; $tec_active = is_plugin_active('the-events-calendar/the-events-calendar.php'); $tec_ce_active = is_plugin_active('the-events-calendar-community-events/tribe-community-events.php'); echo "

The Events Calendar: " . ($tec_active ? '✓ Active' : '✗ Not Active') . "

"; echo "

TEC Community Events: " . ($tec_ce_active ? '✓ Active' : '✗ Not Active') . "

"; $shortcode_exists = shortcode_exists('tribe_community_events'); echo "

tribe_community_events shortcode: " . ($shortcode_exists ? '✓ Registered' : '✗ Not Registered') . "

"; // Check user status if (is_user_logged_in()) { $user = wp_get_current_user(); echo "

Current User: {$user->user_login} (ID: {$user->ID})

"; echo "

User Roles: " . implode(', ', $user->roles) . "

"; } else { echo "

⚠ Not logged in - this may affect form rendering

"; } echo ""; // Test different shortcode variations if ($shortcode_exists) { $variations = [ '[tribe_community_events]' => 'Basic shortcode without parameters', '[tribe_community_events view="submission_form"]' => 'Current implementation (with submission_form view)', '[tribe_community_events view="form"]' => 'Alternative form view', '[tribe_community_events view="edit"]' => 'Edit view without ID', '[tribe_community_events view="submit"]' => 'Submit view variation', '[tribe_community_events view="new"]' => 'New view variation' ]; foreach ($variations as $shortcode => $description) { echo "
"; echo "
Testing: $shortcode
"; echo "

$description

"; // Capture output and errors ob_start(); $output = do_shortcode($shortcode); $errors = ob_get_clean(); if (!empty($errors)) { echo "
PHP Errors/Warnings:
"; echo "
" . esc_html($errors) . "
"; } echo "
"; if (empty(trim($output))) { echo "✗ No output generated"; } else { // Check for form fields $has_inputs = preg_match('/]*type=["\'](?:text|email|url|tel|number|date|time|textarea)["\'][^>]*>/i', $output); $has_textareas = preg_match('/]*>/i', $output); $has_selects = preg_match('/]*>/i', $output); $has_form = preg_match('/]*>/i', $output); echo "

Form Analysis:

"; echo "
    "; echo "
  • Contains <form> tags: " . ($has_form ? '✓ Yes' : '✗ No') . "
  • "; echo "
  • Contains input fields: " . ($has_inputs ? '✓ Yes' : '✗ No') . "
  • "; echo "
  • Contains textareas: " . ($has_textareas ? '✓ Yes' : '✗ No') . "
  • "; echo "
  • Contains select boxes: " . ($has_selects ? '✓ Yes' : '✗ No') . "
  • "; echo "
"; // Show first 1000 characters of output $display_output = strlen($output) > 1000 ? substr($output, 0, 1000) . '...' : $output; echo "

HTML Output (first 1000 chars):

"; echo "
" . esc_html($display_output) . "
"; } echo "
"; echo "
"; } } else { echo "
"; echo "
Cannot Test Shortcode Variations
"; echo "

The tribe_community_events shortcode is not registered. Please ensure TEC Community Events plugin is properly activated.

"; echo "
"; } // Additional debugging info echo "
"; echo "
Additional Debug Information
"; // Check if we're on the correct page type echo "

Current page context:

"; echo ""; // Check for relevant classes/functions $functions_to_check = [ 'tribe_community_events_init', 'tribe_is_community_edit_event_page', 'Tribe__Events__Community__Main' ]; echo "

TEC Functions/Classes:

"; echo ""; echo "
"; ?>
Next Steps

Based on the test results above:

  1. If no shortcode variations produce form fields, the issue is likely with TEC Community Events plugin configuration or permissions
  2. If some variations work better than others, update the HVAC plugin to use the working variation
  3. Check the WordPress admin for TEC Community Events settings that might restrict form display
  4. Ensure the current user has proper permissions to create events