Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter arianfar

    (@arianfar)

    Hello
    I have a lot of the following error in the error log file:

    Error at PHP version: 7.4
    PHP Notice: Trying to get property ‘post_type’ of non-object in ***/wp-includes/class-wp-query.php on line 4338

    Error at PHP version: 8.0
    PHP Warning: Attempt to read property “post_type” on null in ***/wp-includes/class-wp-query.php on line 4338

    I put the part of the class-wp-query.php file that includes line 4338 below.

    public function is_singular( $post_types = ” ) {
    if ( empty( $post_types ) || ! $this->is_singular ) {
    return (bool) $this->is_singular;
    }
    $post_obj = $this->get_queried_object();
    line 4338: return in_array( $post_obj->post_type, (array) $post_types, true );
    }

    I’m getting similar warnings under PHP 8 and also PHP 7.4, with any urls of my website, ending with /feed/;
    (the feed link gets displayed, however the warning is at the top of the page – each /feed page)
    I’ve searched for that warning message on Google and I can say came up with almost hundreds of websites indexed with that warning message in the results.
    So, it seems that’s a very common problem.
    The warning appears only in /feed/ pages, the mentioned line in php file contains:
    return in_array( $post_obj->post_type, (array) $post_types, true );

    Tested at all WordPress version: 5 and up

    All my WordPress and plugins and my template are up-to-date
    If possible, guide me on what to do.
    Thank you very much

    Ok Thakn You

    Thank you for your response
    Thanks to your awesome plugin.
    Note that I use shared hosting and do not have a dedicated IP.
    I acted on your orders. But the problem still persists.
    I Add HSTS header but I cant configure my site for the HSTS preload list. So I get the following message:
    Your site is not yet configured for the HSTS preload list. Read the documentation carefully before you do!
    If possible, you can tell me the best settings of this plugin?
    Thank you.

    Greetings and politeness to you and all

    When I Active ((Enable WordPress 301 redirection to ssl)), my site not showing in a few browser Like IE 11 in win 7 service Pack 1!

    For the first time after clearing the browser cache, it Gives the following message:
    Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://sonarweb.ir again. If this error persists, it is possible that this site uses an unsupported protocol or cipher suite such as RC4 (link for the details), which is not considered secure. Please contact your site administrator.

    The second time after refreshing the browser page also gives the following message:
    This page can’t be displayed
    Make sure the web address http://sonarweb.ir is correct.
    Look for the page with your search engine.
    Refresh the page in a few minutes.

    By the way, I tried all the methods related to Windows settings, but they did not work!
    please guide me To ensure the security of the site And the site is displayed in all browsers.
    I wish you and everyone good health

    thank you @mayur095
    i update yoast seo plugin and my problem sloved
    thank you again for this solution

    I wish you and all good health and happiness
    Live in peace and happiness.
    life is short

    Thread Starter arianfar

    (@arianfar)

    Hello All
    I found the solution
    Using W answered
    Thanks to Wp-Rocket

    Conflict with WooCommerce 4.4.0
    WP Rocket 3.6.4 is now available 🙌
    The latest WooCommerce update, 4.4.0 is breaking themes and plugins, including WP Rocket.

    New version 3.6.4 is now available to fix this conflict.

    Please update to WP Rocket 3.6.4 before updating WooCommerce.

    Thread Starter arianfar

    (@arianfar)

    Thanks for the answers
    I want to update WooCommerce!
    I do not want to clear the face of the issue.
    I want to solve it with your help!

    Is there no way I can use v4.4.0 instead of v4.3.3?
    I am currently using version v4.3.3 but I do not want to stay in this version of woocommerce! In this case, some capabilities and security will be lost!

Viewing 7 replies - 16 through 22 (of 22 total)