Bug with function findPageByShortcode()

Home Forums Calendar Products Community Events Bug with function findPageByShortcode()

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #942686
    Kari Turunen
    Participant

    Tribe Community events is creating slow queries. Query monitor gives the following output:

    Slow Database Queries (above 0.05s)

    Query: “SELECT id from wp_3_posts
    WHERE post_content LIKE ‘%[tribe_community_events]%’
    AND post_type in (‘page’)”
    Caller: /* From /wp-content/plugins/the-events-calendar-community-events/tribe-community-events/tribe-community-events.php:2655] */ TribeCommunityEvents->findPageByShortcode+
    Time: 0.0591

    The reason this happens on every pageload is that if [tribe_community_events] shortcode is not utilized on any page, the query “$id = $wpdb->get_var( $wpdb->prepare( “SELECT id from $wpdb->posts WHERE post_content LIKE ‘%%%s%%’ AND post_type in (‘page’)”, $shortcode ) );” in the function TribeCommunityEvents->findPageByShortcode() returns NULL which is not saved by set_transient and the transient cannot be found and get_transient( ‘tribe-community-events-page-id’ ); will always return false.

    A-P

    #942927
    Josh
    Participant

    Hey,

    Thanks for reaching out to us and providing this information!

    I’ll pass this along to one of our developers to look into this slow query and the potential modification for adjusting this transient.

    Thanks again for reaching out!

    #943371
    Josh
    Participant

    Hey!

    Just wanted to follow up with you on this ticket. I reached out to one of our developers and they agreed that there definitely is some work that we could do to this process to make it more efficient.

    In your comments you mention not having the primary shortcode utilized on the site. Out of curiosity, would you mind giving a little more detail about your setup and how you’re using the Community Events plugin on your site?

    Thanks!

    #983746
    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Bug with function findPageByShortcode()’ is closed to new replies.