Support » Plugin: Awesome Support - WordPress HelpDesk & Support Plugin » Fatal error: Uncaught ArgumentCountError

  • Resolved Elana Davis

    (@elanasparkle)


    Hello,

    I handle the community support for Sprout Invoices and one of our customers brought up that there is a conflict. I did happen to notice this causes the below Fatal Error causing issues displayed in the Sprout Invoices Log pages. I think the array for the tablenav_tabs is looking for the $post_type on every page. The workaround is to check for the null variable by changing the class-admin-tickets-list.php function.

    Function Change:
    public function tablenav_tabs( $post_type = 0, $which = 0) {

    Error in WordPress:
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPAS_Tickets_List::tablenav_tabs(), 1 passed in /home/sprout/primary/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /home/sprout/primary/wp-content/plugins/awesome-support/includes/admin/class-admin-tickets-list.php:885 Stack trace: #0 /home/sprout/primary/wp-includes/class-wp-hook.php(287): WPAS_Tickets_List->tablenav_tabs('') #1 /home/sprout/primary/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #2 /home/sprout/primary/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /home/sprout/primary/wp-content/plugins/sprout-invoices-pro/controllers/records/Records_Admin_Table.php(109): do_action('restrict_manage...') #4 /home/sprout/primary/wp-admin/includes/class-wp-list-table.php(1326): SI_Records_Table->extra_tablenav('top') #5 /home/sprout/primary/wp-admin/includes/class-wp-list-table.php(1260): WP_List_Table->display_tablenav('top') #6 /home/sprout/primary/wp-content/plugins/sprout-invoices-pro/controll in /home/sprout/primary/wp-content/plugins/awesome-support/includes/admin/class-admin-tickets-list.php on line 885

    Thanks
    Elana D.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author yeisonbp

    (@yeisonbp)

    Hi Elana,

    Thanks for the report. Did you apply this code change and it fixed your issue? Let me know to send it to the developer for further review. I can also advise you to deactivate your other plugins one by one and switch to a default WP theme until the issue disappears (it might be related to a conflict on your site).

    Regards.

    Thread Starter Elana Davis

    (@elanasparkle)

    Hello @yeisonbp,

    Yes, that resolved the issue. I found that the plugin was trying to load the table on the pages that were not supposed to. If you allow the array to have a null value, it works for both plugins. I would be happy to test further if you need me to work with the developer you can. Below is the code I added.

    ( $post_typem = 0, $which = 0)

    Thank you for your time.
    Elana D.

    Plugin Author yeisonbp

    (@yeisonbp)

    Hi Elana,

    Thank you. I created a report so that the developers can investigate and, if needed, update the plugin based on your code change.

    Regards.

    Thread Starter Elana Davis

    (@elanasparkle)

    Hello @yeisonbp,

    Great!!! If you need anything, you can go to the support page on SproutInvoices.com, and I can respond there if you need me to test anything. Otherwise, thank you for your time.

    Thanks
    Elana D.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error: Uncaught ArgumentCountError’ is closed to new replies.