• Resolved sharoni

    (@sharoni)


    Hello, I was working on a snippet with an export function and deleted it but now I am unable to export any snippet from Code Snippets. I have deactivated/deleted and uninstalled/reinstalled the plugin. Only the export function is giving this error “There has been a critical error on this website. Please check your site admin email inbox for instructions. Learn more about troubleshooting WordPress.”
    Can you help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The same occurred in my site. When export or Export Code raises exception ( causes Server Error )

    Confirmed, this happens on all our sites.

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Code_Snippets\DB::get_table_name(), 0 passed in /srv/htdocs/wp-content/plugins/code-snippets/php/export/class-export.php on line 38 and exactly 1 expected in /srv/htdocs/wp-content/plugins/code-snippets/php/class-db.php:92 Stack trace: #0 /srv/htdocs/wp-content/plugins/code-snippets/php/export/class-export.php(38): Code_Snippets\DB->get_table_name() #1 /srv/htdocs/wp-content/plugins/code-snippets/php/export/class-export.php(27): Code_Snippets\Export->fetch_snippets(Array, ”) #2 /srv/htdocs/wp-content/plugins/code-snippets/php/class-list-table.php(822): Code_Snippets\Export->__construct(Array) #3 /srv/htdocs/wp-content/plugins/code-snippets/php/class-list-table.php(948): Code_Snippets\List_Table->process_requested_actions() #4 /srv/htdocs/wp-content/plugins/code-snippets/php/admin-menus/class-manage-menu.php(118): Code_Snippets\List_Table->prepare_items() #5 /wordpress/core/6.2.2/wp-includes/class-wp-hook.php(308): Code_Snippets\Manage_Menu->load(”) #6 /wordpress/core/6.2.2/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #7 /wordpress/core/6.2.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /wordpress/core/6.2.2/wp-admin/admin.php(237): do_action(‘load-toplevel_p…’) #9 {main} thrown in /srv/htdocs/wp-content/plugins/code-snippets/php/class-db.php on line 92

    Same here. The temporary workaround is to copy and paste the snippet’s contents rather than exporting it.

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Code_Snippets\DB::get_table_name(), 0 passed in /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/export/class-export.php on line 38 and exactly 1 expected in /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/class-db.php:92 Stack trace: #0 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/export/class-export.php(38): Code_Snippets\DB->get_table_name() #1 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/export/class-export.php(27): Code_Snippets\Export->fetch_snippets(191, ”) #2 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/class-list-table.php(719): Code_Snippets\Export->__construct(191) #3 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/class-list-table.php(764): Code_Snippets\List_Table->perform_action(191, ‘export’, ‘global’) #4 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/class-list-table.php(948): Code_Snippets\List_Table->process_requested_actions() #5 /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/admin-menus/class-manage-menu.php(118): Code_Snippets\List_Table->prepare_items() #6 /home/customer/www/staging.abpp.org/public_html/wp-includes/class-wp-hook.php(308): Code_Snippets\Manage_Menu->load(”) #7 /home/customer/www/staging.abpp.org/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #8 /home/customer/www/staging.abpp.org/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/customer/www/staging.abpp.org/public_html/wp-admin/admin.php(237): do_action(‘load-toplevel_p…’) #10 {main} thrown in /home/customer/www/staging.abpp.org/public_html/wp-content/plugins/code-snippets/php/class-db.php on line 92

    Same crash here. Just in case it may relate; I’m running PHP 8.2.7 now that it’s seven months old and WP Engine has whitelisted it.

    Plugin Author Shea Bunge

    (@bungeshea)

    Apologies everyone, this is a known bug in the current release. I will be releasing a patch, v3.4.2, tonight, which will fix this problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Critical Error on Exporting Snippets’ is closed to new replies.