Plugin Directory

Changeset 3473149


Ignore:
Timestamp:
03/02/2026 11:45:46 PM (4 weeks ago)
Author:
m1styk
Message:

Add diagnostics and troubleshooting for widget loading issues

Location:
insertabot-ai-chatbot-solution/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • insertabot-ai-chatbot-solution/trunk/assets/widget-bridge.js

    r3472307 r3473149  
    174174        : (err && err.message ? err.message : 'Unknown error');
    175175      console.error('[Insertabot] Token exchange failed:', msg);
     176      console.error('[Insertabot] Debug info:', {
     177        tokenEndpoint: tokenEndpoint,
     178        apiBase: baseUrl,
     179        error: err
     180      });
    176181    });
    177182})();
  • insertabot-ai-chatbot-solution/trunk/includes/admin-settings.php

    r3472307 r3473149  
    172172            if ($customer_id) {
    173173                update_option(self::OPTION_CUST_ID, $customer_id);
     174                add_settings_error(
     175                    'insertabot_settings_messages',
     176                    'insertabot_customer_id_cached',
     177                    esc_html__('API key validated and customer ID cached successfully.', 'insertabot-ai-chatbot-solution'),
     178                    'success'
     179                );
     180            } else {
     181                // Clear any stale customer_id
     182                delete_option(self::OPTION_CUST_ID);
     183                add_settings_error(
     184                    'insertabot_settings_messages',
     185                    'insertabot_customer_id_warning',
     186                    esc_html__('API key saved but could not resolve customer ID. Widget will use legacy token format (slower). Check API Base URL.', 'insertabot-ai-chatbot-solution'),
     187                    'warning'
     188                );
    174189            }
    175190        }
  • insertabot-ai-chatbot-solution/trunk/insertabot-ai-chatbot-solution.php

    r3473126 r3473149  
    3434    'includes/rest.php',
    3535    'includes/privacy.php',
     36    'includes/diagnostics.php',
    3637);
    3738
Note: See TracChangeset for help on using the changeset viewer.