Plugin Directory

Changeset 3708610


Ignore:
Timestamp:
09/23/2026 06:22:01 AM (5 weeks ago)
Author:
vCita
Message:

Release 4.6.4 - fix connect flow on fresh installs

Location:
meeting-scheduler-by-vcita/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • meeting-scheduler-by-vcita/trunk/assets/js/utils_v.js

    r3696391 r3708610  
    2323
    2424  this.openAuthWin = (reg = false, logout = false) => {
     25    // The auth URL resolves asynchronously - on a fresh install getAuthURL()
     26    // first registers the site with the scheduler proxy over the network. Opening
     27    // the window after that await puts window.open() outside the user-gesture
     28    // window, so browsers block it and the click silently does nothing. Open the
     29    // window synchronously here, while the gesture is still live, and point it at
     30    // the URL once we have it.
     31    const win = window.open('', '_blank');
     32
    2533    VcitaApi.getAuthURL(reg, logout)
    2634      .then((new_location) => {
    … …  
    3139            'success': (resp) => {
    3240              try {
    33                 console.log('responce after login',resp);
    34                 const ud = JSON.parse(resp);
     41                // wp_send_json() replies with Content-Type: application/json, so
     42                // jQuery has already parsed this into an object. Calling
     43                // JSON.parse() on it threw, the catch below swallowed it, and the
     44                // reload never ran - so after connecting you had to refresh by
     45                // hand to see that it had worked. Accept either shape.
     46                const ud = (typeof resp === 'string') ? JSON.parse(resp) : resp;
    3547                if (typeof ud.uid == 'string' && ud.uid.length > 0) {
    3648                  if (!reg) {
    … …  
    5466        };
    5567       
    56         const win = window.open(new_location, '_blank');
     68        if (!win || win.closed) {
     69          // The popup was blocked outright. Navigate this tab instead so the
     70          // user can still connect, rather than the button doing nothing.
     71          window.location.href = new_location;
     72          return;
     73        }
     74
     75        win.location = new_location;
     76
    5777        const isCloseInterval = setInterval(() => {
    58           if(win.closed) {
     78          // win was never null-checked here: when the popup was blocked this
     79          // threw "Cannot read properties of null" every 500ms, forever.
     80          if (!win || win.closed) {
    5981            clearInterval(isCloseInterval);
    6082            onClose();
    6183          }
    6284        },500)
     85      })
     86      .catch((err) => {
     87        // There was no catch here: if registering the site failed, the promise
     88        // rejected silently and the button looked dead.
     89        if (win && !win.closed) { win.close(); }
     90        console.error('vcita: could not start authentication', err);
     91        window.alert('vcita could not be reached. Please check your connection and try again.');
    6392      })
    6493  };
  • meeting-scheduler-by-vcita/trunk/readme.txt

    r3696391 r3708610  
    44Requires at least: 4.7
    55Tested up to: 7.1
    6 Stable tag: 4.6.3
     6Stable tag: 4.6.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    162162== Changelog ==
    163163
     164= 4.6.4 =
     165 * Fixed: "Let's get started" and "Connect" did nothing on a newly installed site, leaving no way to connect a vcita account. The sign-in window is now opened as soon as you click, and if your browser blocks pop-ups the plugin sends you to vcita in the current tab instead of failing silently.
     166 * Fixed: After connecting your vcita account the page now updates on its own. Previously it kept showing you as disconnected until you refreshed by hand, even though the connection had succeeded.
     167
    164168= 4.6.3 =
    165169 * Privacy: Removed all third-party analytics from the plugin. Mixpanel and Hotjar are no longer loaded, and no usage data or account details are sent to any third party.
  • meeting-scheduler-by-vcita/trunk/vcita-scheduler.php

    r3696391 r3708610  
    44Plugin URI: https://www.vcita.com
    55Description: This plugin shows your free time slot on your blog and allows you to book appointments with your clients 24x7x365. Very easy Ajax interface. Easy to setup and can be controlled completely from powerful admin area.
    6 Version: 4.6.3
     6Version: 4.6.4
    77Author: vCita.com
    88Author URI: https://www.vcita.com
    … …  
    469469        : "vcita.com" ); /* Don't include the protocol, added dynamically */
    470470define( 'WPSHD_VCITA_SERVER_URL', WPSHD_VCITA_SERVER_PREFIX . WPSHD_VCITA_SERVER_BASE );
    471 define( 'WPSHD_VCITA_WIDGET_VERSION', '4.6.3' );
     471define( 'WPSHD_VCITA_WIDGET_VERSION', '4.6.4' );
    472472define( 'WPSHD_VCITA_WIDGET_PLUGIN_NAME', 'Appointment Booking and Online Scheduling by vCita' );
    473473define( 'WPSHD_VCITA_WIDGET_KEY', 'vcita_scheduler' );
  • meeting-scheduler-by-vcita/trunk/vcita-settings-functions.php

    r3695262 r3708610  
    2020
    2121  add_submenu_page(WPSHD_VCITA_WIDGET_UNIQUE_ID . '/vcita-settings-functions.php', __('Add to Site', 'meeting-scheduler-by-vcita'), __('Add to Site', 'meeting-scheduler-by-vcita'), 'edit_posts', get_admin_url('','','admin').'admin.php?page='.WPSHD_VCITA_WIDGET_UNIQUE_ID.'/vcita-settings-functions.php&tab=vcita-add-to-site');
    22   add_submenu_page(WPSHD_VCITA_WIDGET_UNIQUE_ID . '/vcita-settings-functions.php', __('Custom Implemetation', 'meeting-scheduler-by-vcita'), __('Custom Implemetation', 'meeting-scheduler-by-vcita'), 'edit_posts', get_admin_url('','','admin').'admin.php?page='.WPSHD_VCITA_WIDGET_UNIQUE_ID.'/vcita-settings-functions.php&tab=vcita-custom-impl');
     22  add_submenu_page(WPSHD_VCITA_WIDGET_UNIQUE_ID . '/vcita-settings-functions.php', __('Custom Implementation', 'meeting-scheduler-by-vcita'), __('Custom Implementation', 'meeting-scheduler-by-vcita'), 'edit_posts', get_admin_url('','','admin').'admin.php?page='.WPSHD_VCITA_WIDGET_UNIQUE_ID.'/vcita-settings-functions.php&tab=vcita-custom-impl');
    2323  add_submenu_page(WPSHD_VCITA_WIDGET_UNIQUE_ID . '/vcita-settings-functions.php', __('Support', 'meeting-scheduler-by-vcita'), __('Support', 'meeting-scheduler-by-vcita'), 'edit_posts', get_admin_url('','','admin').'admin.php?page='.WPSHD_VCITA_WIDGET_UNIQUE_ID.'/vcita-settings-functions.php&tab=vcita-support');
    2424  add_submenu_page(WPSHD_VCITA_WIDGET_UNIQUE_ID . '/vcita-settings-functions.php', __('Premium', 'meeting-scheduler-by-vcita'), __('Premium', 'meeting-scheduler-by-vcita'), 'edit_posts', get_admin_url('','','admin').'admin.php?page='.WPSHD_VCITA_WIDGET_UNIQUE_ID.'/vcita-settings-functions.php&tab=vcita-premium');
Note: See TracChangeset for help on using the changeset viewer.