Support » Plugin: Yoast SEO » there is WP notice after installing a Yoast

  • Resolved daro2013


    Dear sir,

    I have a classified Theme installed on my website; it works well.

    However, after I installed Yoast plugin, it generates error or notice as on this link:

    I dont have other third party plugins installed on my website except the Theme plugins.

    Can you please advise how to resolve the above issue?

    Many thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Support devnihil


    @daro2013 Can you please confirm whether the error appears when Yoast SEO and a default theme such as TwentyNineteen is active? If the error does not appear when a default theme and Yaost SEO are active, the error is being caused by the theme, and not the Yoast SEO plugin. In that event we’d recommend reporting it to their developers, and checking to see if an update is available.

    Test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin allows you to run a conflict check without affecting normal visitors to your site.

    If you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts

    Thread Starter daro2013


    Dear Sir,

    Thank you for a quick support.

    -I did install your plugin on another domain with Fresh installation of the same theme, there are no errors.

    -This happens on my live site, but all third party plugins have been disabled; and I also reversed it to parent theme; the errors still exist.

    -I very appreciate if you could help advise how to resolve that error:

    Notice: Trying to get property ‘count’ of non-object in /wp-includes/class-wp-term-query.php on line 768

    -and the actual codes for that error in class-wp-term-query.php is:

    if ( $child->count ) {
    continue 2;

    -in the block of codes:

    if ( $hierarchical && $args[‘hide_empty’] && is_array( $terms ) ) {
    foreach ( $terms as $k => $term ) {
    if ( ! $term->count ) {
    $children = get_term_children( $term->term_id, $term->taxonomy );
    if ( is_array( $children ) ) {
    foreach ( $children as $child_id ) {
    $child = get_term( $child_id, $term->taxonomy );
    if ( $child->count ) {
    continue 2;

    // It really is empty.
    unset( $terms[ $k ] );


    Plugin Support Md Mazedul Islam Khan


    Thanks for your confirmation. We looked at your site and couldn’t find the relevant PHP notice on there. Can you please confirm where exactly do you see the relevant PHP notice?

    On the other hand, if you are unable to reproduce the same issue on a fresh WordPress installation with the same theme active alongside the Yoast SEO plugin, this is an issue specific to your current setup.

    You’ll need to make sure that you are running the latest version of everything and try switching the theme to the default 2020 theme to see if you still experience the same issue on the current setup.

    You should enable debug backtrace (to see all involved methods/functions not only the last in the chain). You can use xdebug PHP extension, Query Monitor or custom PHP code to log/see full debug backtrace.

    More details:

    PS: It’s possible that “children cache” is corrupted. You should delete option category_children (or product_cat_children depends on taxonomy) to force WP core to regenerate this cache.

    Thread Starter daro2013


    Thank you for all supports.

    The errors are generated on Admin backend on Custom Post Type pages (Add New or Edit):

    @md Mazedul Islam Khan – I can give credentials for FTP and WP Admin to you to help find out the bug. Can I send them to you by email?

    @saša – PS: It’s possible that “children cache” is corrupted. You should delete option category_children (or product_cat_children depends on taxonomy) to force WP core to regenerate this cache.
    How can I delete it?

    Many thanks

    Thread Starter daro2013


    @saša I have use this wp-config.php template as you suggested:

    to track the bugs. After I put them in my wp-config.php (keeping all DB details untouched), the WP Admin completely broke up on the above pages (but the front end still displayed as normal):

    which show the following error:

    Fatal error: Uncaught Error: Call to undefined function nocache_headers() in /home/bn5fd0ohg2a6fdbh/public_html/ Stack trace: #0 /home/bn5fd0ohg2a6fdbh/public_html/ require_once() #1 {main} thrown in /home/bn5fd0ohg2a6fdbh/public_html/ on line 36

    I had a look at /wp-admin/admin.php in line 36, there is a function called:


    which causes such error. However, I also checked the fresh installation of theme with Yoast on another domain, that function does exist too.

    So the cache may cause this kind of error?


    Thread Starter daro2013


    Update: I installed and activate Query Monitor plugin as advised by @saša, and identified some tracks of bugs in relation to Yoast plugin.

    Here are the details:

    Unknown location

    Please advise how to fix them.


    It seems that’s an issue with primary category.

    Please try to flush object cache or delete transients if you don’t have object cache. Try to edit some child term (category), it’ll regenerate “category_children”.

    Have you installed any multi-language plugin?

    Thread Starter daro2013



    Yes, I have installed multi-language plugin. I also use WP-Rocket.

    -I think I dont have Object cache on my wordpress after I issued this command in /public_html/:

    wp cache flush

    -bash: wp: command not found

    -I have cleared all caches in WP Rocket as well as in the following folders:


    -I have also clear The theme cache too which is a bult-in cache.

    -I use both WP-Rocket to clean up Transients cache and use Transients manager plugin to delete them. However, there are 15 transients cache left which cannot be deleted by that plugin, and 5 of them belong to Yoas plugin.

    How can I delete those transients cache completely so that the theme or plugins can generate new ones?


    Thread Starter daro2013


    Update: I have run the following command in SSH:

    wp cache flush
    wp transient delete –all

    The WP notice still exist on both two pages above at Admin backend. However, instead of showing over 250 notices with same line, now it displays only two lines like this:

    Notice: Trying to get property ‘count’ of non-object in /wp-includes/class-wp-term-query.php on line 768

    Notice: Trying to get property ‘count’ of non-object in /wp-includes/class-wp-term-query.php on line 768

    Both of them are related to Yoast plugin based on Query Monitor.

    Is there any other cache I have to delete to fix the above WP notice?

    Many thanks in advance.

    Plugin Support Pcosta88



    We are not familiar with the transient caches which are not Yoast, so you will need to contact the theme/plugin which is responsible for making them.

    With Yoast, can you describe exactly what these transient caches are?

    Thread Starter daro2013


    And moreover, the 15 transient cache I see in Query Monitor still there. Basically they have not been deleted at all after I issued the 2 commands above.

    Also some other WP notices not related to Yoast plugin have also been gone; not seen any more.

    Therefore CACHE does cause WP notices as advised by the gentlement @saša

    Any advice is very appreciated.

    Thread Starter daro2013


    @pcosta88 I dont know much too about Transient cache which is stored in DB by the theme and plugin for a specific period for better performance. Please read here:

    AIT Theme uses Yoast plugin as its default SEO plugin (although not built-in Yoast on AIT Theme). Their support is very limited, and if AIT theme developers know Yoast works well on AIT Theme, they would not help me. I can try to open a ticket for that to see what AIT theme tech support say.

    It is very weird this WP notice has come up quite long ago as I dont turn on WP debug mode.

    Any advice how to fix this error is very appreciated.


    @daro2013 The command has removed all transients, but first access (even to you check transients) will show few transients. It’s expected behavior.

    If you have access to SSH/WP-CLI then you can try to remove “children options”:

    wp option delete category_children
    wp option delete category_children_en
    wp option delete category_children_de

    After this, you can try: wp term list category to see is it working without notices.

    Which is lang plugin? WPML or something else?

    Thread Starter daro2013


    @pcosta88 please find screenshot in this link:

    You can see that Transients Manager plugin lists 5 transient cache related to Yoast plugin (yoast1.jpg)

    and Query Monitor plugin identifies the WP notice in relation to Yoast plugin too (yoast2.jpg)


Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘there is WP notice after installing a Yoast’ is closed to new replies.