tribe_mini_calendar shortcode count option

Home Forums Calendar Products Events Calendar PRO tribe_mini_calendar shortcode count option

  • This topic has 5 replies, 4 voices, and was last updated 9 years ago by Laurier.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1104449
    Laurier
    Participant

    Just wanted to alert you to a bug in the expected behaviour of the [tribe_mini_calendar] shortcode. In another thread (https://theeventscalendar.com/support/forums/topic/shortcode-to-hide-listed-events-below-calendar-widget/) it was stated the count attr can be set to 0 to disable AJAX loading of events and instead link to the “day” page.

    This did not work for me (PHP 5.6, WP 4.5, Event Calendar Pro 4.1.2), although any other value for count works. Looking at the code in src/Tribe/Shortcodes/Mini_Calendar.php it seems to me that lines 59-62

    `php
    // Avoid passing an empty count argument (will cause 0 events to be listed)
    if ( empty( $this->arguments[‘count’] ) ) {
    unset( $this->arguments[‘count’] );
    }
    `

    is not correct, because empty(“0”) is true. See http://php.net/manual/en/function.empty.php

    I suggest replacing the conditional with $this->arguments['count'] === ''.

    In the meantime, it does seem to be possible to work around sans hacking around by doing [tribe_mini_calendar count="zero"].

    Best,
    @CAYdenberg

    #1104576
    Cliff
    Member

    Hi. Thanks so much for the thorough report!

    I passed it along to our developers to take a deeper look.

    I’ll mark this ticket as Pending Fix, which means this thread should receive a reply if/when the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release. I apologize for this issue and appreciate your understanding and patience.

    #1110553
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

    #1272063
    Nico
    Member

    Hi,

    Just wanted to share with you that maintenance release 4.4.6 of our plugins is out, including a fix for this issue 🙂

    Find out more about the release → https://theeventscalendar.com/maintenance-release-events-calendar-pro-4-4-6-event-tickets-4-4-6-premium-add-ons/

    Please update the plugins and let us know if the fix works for your site,
    Best,
    Nico

    #1283048
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘tribe_mini_calendar shortcode count option’ is closed to new replies.