• Resolved benhen31

    (@benhen31)


    Hi,

    Great plugin, thanks for all the work. I discovered a usability bug, or I suppose lack of error catching:

    We have multiple calendars on one page, which works great. However, if the shortcode for a calendar is wrong (the ID number, or miss a equation mark for example), then the calendar that get’s rendered is the calendar from whatever previous calendar shortcode was correct. For example:

    [CP_APP_HOUR_BOOKING id=”102″]
    [CP_APP_HOUR_BOOKING id=”103″]
    [CP_APP_HOUR_BOOKING id=”104]

    Will result in all the bookings for the final calendar (which is supposed to be 104) being saved into the 103 calendar.

    It’s like the javascript that renders is just using the previous value – after rendering, perhaps some variables need to be explicitly cleared so they can’t carry over to the next instance.

    If the user has made an error in the shortcode, or used a shortcode for a calendar that has since been deleted, then an error should be displayed. It should not silently render a different calendar.

    Thanks,
    Ben.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    The shortcode can optionally be used without specifying a calendar ID, in which case it will use the ID of the last booking form. In the case you describe, no ID is received at all, so the shortcode is processed as if no calendar ID had been specified.

    We are already looking at solutions for this while maintaining backwards compatibility (backwards compatibility is the reason why we cannot just return an error if the calendar ID is not specified). We will probably release an update that adds a new shortcode with the required parameters, while keeping the current shortcodes for backwards compatibility.

    Thank you for the feedback!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.