- Document enhanced event creation testing improvements - Add Breeze cache clearing script and integration - Detail form field mapping discoveries - Note current validation issues with description field - Include multiple test approaches implemented - Update error handling and debugging capabilities
79 lines
No EOL
2.2 KiB
Bash
Executable file
79 lines
No EOL
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Debug dashboard live on server
|
|
|
|
# Get absolute path to this script's directory
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Navigate to wordpress-dev directory
|
|
cd "$(dirname "$SCRIPT_DIR")" || exit 1
|
|
|
|
# Load environment variables
|
|
ENV_FILE=".env"
|
|
if [ ! -f "$ENV_FILE" ]; then
|
|
echo "Error: .env file not found at: $ENV_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
source "$ENV_FILE"
|
|
|
|
echo "=== Debugging Dashboard Live ==="
|
|
echo "Remote host: $UPSKILL_STAGING_IP"
|
|
echo "==============================="
|
|
|
|
# Debug dashboard
|
|
sshpass -p "${UPSKILL_STAGING_PASS}" ssh -o StrictHostKeyChecking=no "${UPSKILL_STAGING_SSH_USER}@${UPSKILL_STAGING_IP}" <<'EOF'
|
|
cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html
|
|
|
|
# Create debug script
|
|
cat > debug-dashboard.php << 'PHP'
|
|
<?php
|
|
require_once 'wp-load.php';
|
|
|
|
echo "=== DASHBOARD DEBUG ===\n\n";
|
|
|
|
// Check plugin file
|
|
$plugin_file = '/home/974670.cloudwaysapps.com/uberrxmprk/public_html/wp-content/plugins/hvac-community-events/includes/class-hvac-dashboard-data.php';
|
|
echo "Plugin file exists: " . (file_exists($plugin_file) ? 'Yes' : 'No') . "\n";
|
|
echo "Plugin file modified: " . date('Y-m-d H:i:s', filemtime($plugin_file)) . "\n\n";
|
|
|
|
// Test dashboard data directly
|
|
require_once $plugin_file;
|
|
$dashboard = new HVAC_Dashboard_Data(17);
|
|
|
|
echo "Direct method calls:\n";
|
|
echo "Total events: " . $dashboard->get_total_events_count() . "\n";
|
|
echo "Upcoming events: " . $dashboard->get_upcoming_events_count() . "\n";
|
|
echo "Past events: " . $dashboard->get_past_events_count() . "\n\n";
|
|
|
|
// Test a raw query
|
|
echo "Raw query test:\n";
|
|
$args = array(
|
|
'post_type' => 'tribe_events',
|
|
'author' => 17,
|
|
'posts_per_page' => -1,
|
|
'post_status' => 'any'
|
|
);
|
|
$query = new WP_Query($args);
|
|
echo "Found: " . $query->found_posts . "\n";
|
|
echo "SQL: " . $query->request . "\n\n";
|
|
|
|
// Check cache
|
|
echo "Cache status:\n";
|
|
$cache_group = 'counts';
|
|
$cache_key = 'hvac_events_17';
|
|
$cached = wp_cache_get($cache_key, $cache_group);
|
|
echo "Cached value: " . var_export($cached, true) . "\n";
|
|
|
|
// Clear cache and try again
|
|
wp_cache_flush();
|
|
echo "\nAfter cache flush:\n";
|
|
echo "Total events: " . $dashboard->get_total_events_count() . "\n";
|
|
|
|
PHP
|
|
|
|
php debug-dashboard.php
|
|
rm debug-dashboard.php
|
|
EOF
|
|
|
|
echo "Debug completed!" |