Bug Fix – Uncheck 'Show Google Maps Link' in Venues

Home Forums Calendar Products Bug Fix – Uncheck 'Show Google Maps Link' in Venues

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #121287
    fervorcreative
    Participant

    For anyone having the same problem of not being able to Uncheck the box for ‘Show Google Maps Link’ in Venues, I was able to track down the bug and offer a solution:

    You can find these changes at line 141 of /wp-content/plugins/the-events-calendar/admin-views/venue-meta-box.php.

    To fix the behavior, make the following change [at line 141] from:

    $google_map_link_toggle = ( get_post_status($postId) != 'auto-draft' || get_post_meta( $postId, '_VenueShowMapLink', true ) !== 'false' ) ? true : false;

    To the following:

    $google_map_link_toggle = ( get_post_status($postId) != 'auto-draft' && get_post_meta( $postId, '_VenueShowMapLink', true ) !== 'false' ) ? true : false;

    The original code always evaluated to true, which consistently set the checkbox to be “checked”, regardless of the _VenueShowMapLink post meta value in the database.

    Tested against The Events Calendar v3.4.1 and WordPress v3.8.1 using Twenty Twelve v1.3.

    #121359
    Barry
    Member

    Thanks for sleuthing that one out, it looks like the boolean logic could indeed do with a revision and we’ll log an issue to address this in an upcoming release 🙂

    #124006
    Barry
    Member

    Unfortunately we weren’t able to squeeze this one into our 3.5 release 3.5 but I wanted to drop a note in here to let you know it’s still on our radar and we will try hard to fit it in to the next release instead. Thanks for your support and patience in the meantime!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Bug Fix – Uncheck 'Show Google Maps Link' in Venues’ is closed to new replies.