• Resolved rudolfl

    (@rudolfl)


    Hi

    Just did an update and site crashes. Removed plugin, installed fresh version — same. As soon as it is activated, site crahses

    PHP error log:

    [05-Oct-2024 02:32:57 UTC] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “add_links” not found or invalid function name in /home/beltsfromozcom/public_html/wp-includes/class-wp-hook.php:326
    Stack trace:

    0 /home/beltsfromozcom/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)

    1 /home/beltsfromozcom/public_html/wp-admin/includes/class-wp-plugins-list-table.php(1076): apply_filters(‘plugin_action_l…’, Array, ‘markup-by-attri…’, Array, ‘all’)

    2 /home/beltsfromozcom/public_html/wp-admin/includes/class-wp-plugins-list-table.php(707): WP_Plugins_List_Table->single_row(Array)

    3 /home/beltsfromozcom/public_html/wp-admin/includes/class-wp-list-table.php(1712): WP_Plugins_List_Table->display_rows()

    4 /home/beltsfromozcom/public_html/wp-admin/includes/class-wp-list-table.php(1639): WP_List_Table->display_rows_or_placeholder()

    5 /home/beltsfromozcom/public_html/wp-admin/plugins.php(801): WP_List_Table->display()

    6 {main}

    thrown in /home/beltsfromozcom/public_html/wp-includes/class-wp-hook.php on line 326

    After some poking around, crash is caused by this line:

    add_filter(“plugin_action_links_” . plugin_basename(FILE), ‘add_links’);

    No, not in the add_links() function itself, just adding this filter causes crash. I guess, it has something to do with the generated filter name not matching what WP expects

    • This topic was modified 1 month, 3 weeks ago by rudolfl.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.