• Resolved Jory Hogeveen

    (@keraweb)


    When there are many tickets the WP Dashboard (at a glance) will make tons of queries to load all the attendies.
    Adding to this, when Pro is installed it doubled this amount.

    Stack trace:

    WP_Post::get_instance()
    wp-includes/class-wp-post.php:243
    get_post()
    wp-includes/post.php:1006
    Tribe__Tickets__Tickets::get_attendees_from_modules()
    wp-content/plugins/event-tickets/src/Tribe/Tickets.php:1576
    Tribe__Tickets__Tickets::get_attendees_by_args()
    wp-content/plugins/event-tickets/src/Tribe/Tickets.php:1470
    TEC\T\A\Glance_Items->custom_glance_items_attendees()
    wp-content/plugins/event-tickets/src/Tickets/Admin/Glance_Items.php:32
    apply_filters('dashboard_glance_items')
    wp-includes/plugin.php:205
    wp_dashboard_right_now()
    wp-admin/includes/dashboard.php:362
    do_meta_boxes()
    wp-admin/includes/template.php:1445
    wp_dashboard()
    wp-admin/includes/dashboard.php:271

    Query:

    SELECT *
    FROM PREFIX_posts
    WHERE ID = ##
    LIMIT 1

    And the same for Event Tickets Plus:

    WP_Post::get_instance()
    wp-includes/class-wp-post.php:243
    get_post()
    wp-includes/post.php:1006
    Tribe__Tickets_Plus__Commerce__WooCommerce__Main->get_attendee()
    wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php:2411
    Tribe__Tickets__Tickets::get_attendees_from_modules()
    wp-content/plugins/event-tickets/src/Tribe/Tickets.php:1569
    Tribe__Tickets__Tickets::get_attendees_by_args()
    wp-content/plugins/event-tickets/src/Tribe/Tickets.php:1470
    TEC\T\A\Glance_Items->custom_glance_items_attendees()
    wp-content/plugins/event-tickets/src/Tickets/Admin/Glance_Items.php:32
    apply_filters('dashboard_glance_items')
    wp-includes/plugin.php:205
    wp_dashboard_right_now()
    wp-admin/includes/dashboard.php:362
    do_meta_boxes()
    wp-admin/includes/template.php:1445
    wp_dashboard()
    wp-admin/includes/dashboard.php:271

    Please address this as it’s quite a performance hit.

    Cheers, Jory

Viewing 9 replies - 1 through 9 (of 9 total)
  • You issue sounds similar to the previous thread.

    @jeanabarquez with plugin support posted this:

    To help you with your issue, please try adding the following code snippet to the bottom of the event-tickets.php file (in wp-content/plugins/event-tickets/)

    add_action( 'plugins_loaded', function () {
    tribe_singleton( TEC\Tickets\Admin\Glance_Items::class, TEC\Tickets\Admin\Glance_Items::class);
    }, 1 );
    
    add_action( 'admin_init', function() {
    remove_filter( 'dashboard_glance_items', [ tribe( TEC\Tickets\Admin\Glance_Items::class ), 'custom_glance_items_attendees' ], 10 );
    }, 20 );
    • This reply was modified 1 year, 7 months ago by justravis.
    Thread Starter Jory Hogeveen

    (@keraweb)

    Hi @justravis

    Thanks for pointing out this is already reported.

    Tribe could change these class names in a future version and this would result in an error.
    In short, manually removing these filters isn’t a solution but a short term band-aid.

    It’s better that they fix the query loop internally instead. I can hardly imagine that there wouldn’t be a better performing solution.
    Alternatively users should be able to opt-out from the UI.

    Cheers, Jory

    Jean A

    (@jeanabarquez)

    Hello @keraweb ,

    Thank you for starting this thread.

    I want to confirm that our development team is aware of the issue and has already logged it [ET-1698]. As you mentioned, the long-term solution is to address the queries internally.

    However, while we wait for the permanent fix, please apply the recommended workaround. This should help to alleviate the issue in the short term.

    Thank you again for your patience and understanding. Please let us know if you have any further questions.

    Kind regards,
    Jean

    Thread Starter Jory Hogeveen

    (@keraweb)

    Hi @jeanabarquez

    Thanks for confirming!

    For anyone who wants to remove those filters safely, please wrap the method calls with:

    if ( class_exists( 'TEC\Tickets\Admin\Glance_Items' ) ) {
        // Remove filters.
    }

    Cheers, Jory

    Plugin Support Darian

    (@d0153)

    Hi @keraweb

    Thanks for sharing the additional snippet for safely removing the filters mentioned above.

    As soon as we release a fix for this issue, we will post an update here in the thread.

    Appreciate your patience so far. If you do have other concerns or issues you need help with, please create another support topic as indicated in the www.ads-software.com support guidelines.


    Internal Bug Ticket Reference: ET-1698

    Plugin Support Darian

    (@d0153)

    Hi @keraweb

    I’m sorry for the late update.

    We just released an update that should resolve this issue. Could you try updating Event Tickets to the latest version and check/confirm if the issue is resolved?

    Looking forward to your reply.

    Plugin Support Darian

    (@d0153)

    Hi @keraweb

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Thread Starter Jory Hogeveen

    (@keraweb)

    Hi @d0153

    Sorry, didn’t find the time to test this yet, I assume it’s just fixed but if my client notifies me of any occurring errors I’ll reply here again or start a new thread!

    Cheers, Jory

    Plugin Support Darian

    (@d0153)

    Hi @keraweb

    No worries. If you’re still having some issues please do not hesitate to bump a new thread on our way. This allows us to track topics/issues efficiently and follow the WordPress Forum Guidelines

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Enormous amount of calls on dashboard’ is closed to new replies.