• Resolved staticweb

    (@staticweb)


    https://example.local/wp-admin/edit.php?post_type=xxx

    Fatal error: Uncaught TypeError: Argument 1 passed to WPSEO_Abstract_Post_Filter::add_filter_link() must be of the type array, null given, called in D:\xampp\htdocs\example\wp-includes\class-wp-hook.php on line 286 and defined in D:\xampp\htdocs\example\wp-content\plugins\wordpress-seo\admin\filters\class-abstract-post-filter.php on line 96

    Works without YOAST and older YOAST Version.

    WordPress: 4.9.8
    Genesis: 2.6.1
    YOAST: 8.0.0
    PHP: 7.1.4

    • This topic was modified 6 years, 7 months ago by staticweb.
    • This topic was modified 6 years, 7 months ago by staticweb.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support devnihil

    (@devnihil)

    This could also be caused by a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:
    1. Make sure the issue doesn’t persist when Yoast SEO is disabled.
    2. Check for conflicts.
    3. Check for JavaScript errors with your console.
    If you find any JavaScript errors related to Yoast SEO or if there is a conflict with a plugin or a theme, you can create a new GitHub issue for our developers. Please report the issue to a third party developer as well.
    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.

    Thread Starter staticweb

    (@staticweb)

    Thank you for answer as text module.

    1. Make sure the issue doesn’t persist when Yoast SEO is disabled.

    Works without YOAST and older YOAST Versions.

    2. Check for conflicts.

    No! Sorry, show reviews from “Health Check” Plugin!

    Works without YOAST! Is not a problem with other plugins.

    3. Check for JavaScript errors with your console.

    FATAL ERROR and JS Errors? No site = no errors!

    Hi,

    We understand it works without Yoast however we suspect there still may be a conflict with another plugin or theme when Yoast is active. We suggest two actions to resolve the issue:

    A. Perform a conflict check as described here: https://kb.yoast.com/kb/how-to-check-for-plugin-conflicts/. You may need to create a staging site. Your host provider can help with this.

    B. Update your PHP to v7.2 or greater. This guide explains more: https://kb.yoast.com/kb/plugin-requirements/. If you are not sure how to do that, please speak with your host provider.

    Thread Starter staticweb

    (@staticweb)

    Thanks for quickly response.

    I have disabled all plugins, except my own (mu-plugin for custom post type and new taxonomy).

    I have upgraded xampp on version 7.2.0.

    Same problem! Has YOAST a generally problem with custom post types?

    Stack trace:
    #0 D:\xampp\htdocs\example\wp-includes\class-wp-hook.php(286): WPSEO_Abstract_Post_Filter->add_filter_link(NULL)
    #1 D:\xampp\htdocs\example\wp-includes\plugin.php(203): WP_Hook->apply_filters(NULL, Array)
    #2 D:\xampp\htdocs\example\wp-admin\includes\class-wp-list-table.php(375): apply_filters(‘views_edit-xxx’, Array)
    #3 D:\xampp\htdocs\example\wp-admin\edit.php(345): WP_List_Table->views()
    #4 {main} thrown in D:\xampp\htdocs\example\wp-content\plugins\wordpress-seo\admin\filters\class-abstract-post-filter.php on line 96

    Plugin Support Michael Ti?a

    (@mikes41720)

    If you’ve disabled all plugins except your own custom plugin and Yoast SEO for WordPress, this might be where the conflict lies. If you disable the custom plugin and only activate Yoast SEO for WordPress, as well as use a default theme like TwentySeventeen, can you confirm that the error goes away?

    Thread Starter staticweb

    (@staticweb)

    My plugin has code to register the custom post type, change permalinks, … and cannot be removed.

    It is a YOAST problem with custom post type and|or changing permalinks.

    I changed the function add_filter_links() for custom post type in class-abstract-post-filter.php as bugfix and it works:

    public function add_filter_links() {
        foreach ( $this->get_post_types() as $post_type ) {
            if( $post_type !== 'xxx' ) {
                add_filter( 'views_edit-' . $post_type, array( $this, 'add_filter_link' ) );
            }
        }
    }

    Where can I generally disable the link filter for this custom post type (update save)?

    • This reply was modified 6 years, 7 months ago by staticweb.
    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    While we are unable to confirm whether this is a bug or not, we’d welcome you to submit a pull request directly to our development repository with the changes you have made to fix the issue so our development team can look into this further.

    Closed. No further concerns.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error and Custom Post Type list (wp-admin/edit.php) after YOAST update’ is closed to new replies.