Support » Plugin: Appointment Calendar » Promising, but has issues. Not quite ready for production, IMO.

  • First and foremost, I’d like to express my appreciation to the developers for all of their hard work so far on this promising plugin.

    That being said, this plugin has issues and is not quite ready to be used on a production-level website.

    Here’s some of what I’ve noticed so far…

    • The [APCAL] shortcode isn’t setup correctly. All of the JavaScript links and HTML code is directly outputted at runtime using echo instead of being stored into a variable and returned to WordPress for rendering within the WP’s the_content().

      This causes a number of issues: The calendar gets rendered before the WP template does (so it’s outside the template) and all of the JavaScript and CSS links get put within the HTML body instead of being inside the <HEAD></HEAD> tags.

      The issue of the HTML code getting directly outputted can be fixed by using PHP Output Buffering: ob_start(); at the beginning of the appointment_calendar_shortcode function (within the appointment-calendar-shortcode.php file), and then putting $htmlOut = ob_get_clean(); ob_end_clean(); return $htmlOut; right before the end of the function. This way, all HTML output is returned for WordPress to use in the_content().

      As for the JavaScript & CSS links issues, WordPress’ provided functions wp_enqueue_script(), wp_enqueue_style() would fix those in a heartbeat.

    • Upon submitting an appointment, 2 appointments get created instead of just 1. I’m not sure why this is yet, but I’ll post an update later as soon as I figure out a fix.
    • The notification/confirmation e-mail messages can’t be edited from the WordPress back-end. The plugin developers have really tried do a good job of writing them, but the language isn’t entirely correct. It would be nice if admins could write their own, using the TinyMCE editor and %variable_placeholders% for things like name, date, start time, etc.

      This was a breeze for me to do with the client site I’m working on now, especially since strip_tags() can be used to derive a plain-text version from the HTML version, and then both the HTML & plain-text versions can be sent in the same message (using the Content-Type: multipart/alternative; boundary=whatever e-mail header) which lets the recipient’s client software pick which should be displayed.

    • Under “Manage Appointments”, there’s no one-click Approve or Cancel buttons. Not having these adds an extra step to the process of approving an appointment: The admin has to click “Update Appointment”, then select “Approved”, then save it. This works just fine, but it makes approving the appointments more tedious.
    • A lot of the settings are stored to the wp_options table in serialized array format. I’d prefer to see them stored using JSON format (using json_encode() andjson_decode()`) simply because it makes them more searchable by MySQL and less prone to breakage, but I suppose it’s up to the developers.

    Some of these seem critical in my mind, while others would just be nice to have. All in all, this is a very promising plugin that’s off to great start.

    I’d happily contribute if the developers have a git repository 🙂 Keep up the good work, guys – You’ve almost got it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Update #1

    I’ve (sort of) fixed the issue where 2 appointments are added instead of just 1.

    It turns out that the $wpdb->query($AddAppointment_sql) line is being run twice when an appointment is submitted. I believe this is because I am using PHP output buffering ( ob_start(); ) but cannot confirm this until I have tested things further.

    For the time begin, I’ve fixed the issue by changing this line…

    if( $wpdb->query($AddAppointment_sql) )

    … to this:

    $key_exists = $wpdb->get_var('SELECT id as "true" FROM '.$wpdb->prefix.$table_name.' WHERE appointment_key = "'.$appointment_key.'" LIMIT 1');
    if( $key_exists != "true" && $wpdb->query($AddAppointment_sql) )

    This isn’t the most elegant way to fix the problem since it adds another DB query to the process, but everything seems to work fine now.

    Like I said above, I’m going to do some more testing and modify some code to see if I can’t help the authors out a bit.

    Plugin Author a.ankit


    HI KOry,

    Thanks a lot for taking out time to provide such detailed feedback. We really appreciate it.

    1) Thanks for your suggestions on the shortcode. I have taken a note and will see how can we incorporate it in future versions.

    2) Currently the free version does not have editable Email notifications. This is feature is in premium version though. However we do plan to incorporate this feature in future releases.

    3) Thanks for your suggestions on Appointment Approval Interface. Till now we havent had users complain about the steps involved in approving an appointment. We will revisit the interface and see if it can be made more intuitive.

    Once again thanks a lot for the feedback..

    Also let me know if output buffering hack is working fine in your case.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Promising, but has issues. Not quite ready for production, IMO.’ is closed to new replies.