Attempt to read property "post_excerpt"

edited December 2021 in Other
[04-Dec-2021 18:37:02 UTC] PHP Warning:  Attempt to read property "post_excerpt" on null in /home/wp-content/themes/betheme/includes/content-single.php on line 361


Hello,


WP generated the error above today.

Any thoughts?


Thanks.

BTW, this issue happened when changing PHP to 8

Comments

  • Same error on line 216
    


  • Hello,

    Can you tell me what version of Betheme and WP do you have, please?


    Thanks

    • WP Version  5.8.2
    • Theme 25.1.5.1


  • Please send us the WordPress dashboard and FTP access privately thru the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact and we will check what might be the reason.

    Notice!

    Please attach a link to this forum discussion.

    Thanks

  • We have checked it. However, this issue cannot be fixed ad hoc.

    So we need to take a closer look at it, but it should be resolved in the next update.


    Best regards

  • Thanks for checking. Hope it's fixed on in the next update.

  • edited December 2021

    Same issue remains with version 25.1.6

    but it's two lines now.

    Is it significant? or it can be ignored?

    the following line as well.

    [10-Dec-2021 18:29:07 UTC] PHP Warning: Attempt to read property "post_excerpt" on null in /home/wp-content/themes/betheme/includes/content-single.php on line 216

  • BTW, same admin access and FTP access remain if needed.

  • Got another error.

    Trying to access array offset on value of type bool in /home/wp-content/themes/betheme/functions/theme-head.php on line 643

  • This version was released on December 7th. So actually, I was talking about the next update.

    Did you notice if this or the previous message affected in the functionality of your website? If they do not interrupt in your website, they can be ignored for now, however, we will take a look at both of them.


    Thanks

  • Thanks, and no, functionality wasn't an issue.

    will wait for the next update.

    Have a good day.

  • We released a new update.

    Please, check if these errors still appear with the new version.


    Thanks

  • edited December 2021

    Thanks for following up,

    Just updated, and then the same errors appeared.

    [14-Dec-2021 12:11:19 UTC] PHP Warning: Attempt to read property "post_excerpt" on null in /home/wp-content/themes/betheme/includes/content-single.php on line 361

    [14-Dec-2021 12:21:32 UTC] PHP Warning: Attempt to read property "post_excerpt" on null in /home/wp-content/themes/betheme/includes/content-single.php on line 216


    As before, Admin/FTP access remains active if needed.

    Thanks.

  • Sorry, I have contacted the dev team.

    It was not resolved yet, but we will try to fix it as soon as possible.


    Thanks

  • Well, thanks for following up anyway. Hope to see it fixed in the next release.

    Appreciate your support.

    Have a good day.

  • We released the update which should fix this warning.

    Please, update your Betheme to the newest version.


    Thanks

  • edited December 2021

    Hello,

    Updated the theme yesterday, and the previous errors stopped.

    however I'm finding this new one.

    [25-Dec-2021 02:01:03 UTC] PHP Warning: Undefined array key "HTTP_USER_AGENT" in /home/wp-content/themes/betheme/functions/theme-head.php on line 21

    as before, admin access is still open if needed.

  • We will take a look at this too, and the fix for it should be available in the next update.


    Thanks

  • Hello again,

    updated today, and noticed this error


    [04-Jan-2022 09:12:03 UTC] PHP Warning: Attempt to read property "post_type" on null in /home/wp-includes/class-wp-query.php on line 4196


    is this relevant?

    Thanks

  • Hi,

    Can you switch to another theme, and check if the same warning appears, please?


    Thanks

  • Hello

    So 2 hours ago i checked the log file, and there was the following

    [04-Jan-2022 09:12:03 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/wp-includes/class-wp-query.php on line 4196
    [04-Jan-2022 16:04:50 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/wp-includes/class-wp-query.php on line 4196
    [04-Jan-2022 16:04:58 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/wp-includes/class-wp-query.php on line 4196
    [04-Jan-2022 16:04:58 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/wp-includes/class-wp-query.php on line 4196
    [04-Jan-2022 23:32:47 UTC] PHP Warning:  Trying to access array offset on value of type bool in /home/wp-content/themes/betheme/functions/theme-head.php on line 645
    [05-Jan-2022 00:53:55 UTC] PHP Warning:  Trying to access array offset on value of type bool in /home/wp-content/themes/betheme/functions/theme-head.php on line 645
    [05-Jan-2022 02:11:40 UTC] PHP Warning:  Attempt to read property "comment_ID" on null in /home/wp-includes/comment-template.php on line 677
    [05-Jan-2022 02:11:40 UTC] PHP Warning:  Attempt to read property "user_id" on null in /home/wp-includes/comment-template.php on line 28
    [05-Jan-2022 02:11:40 UTC] PHP Warning:  Attempt to read property "comment_ID" on null in /home/wp-includes/comment-template.php on line 48
    

    I've switched to default wordpress 2021 theme for about 2 hours now and no error appeared.

    I cleared the log file and will stick with 2021 theme for another 9 hours and will let you know what happens.

    int he meantime, i've activated the admin access/ FTP again if needed and you have the details.


    Thanks.

  • I will wait then for the results.


    Thanks

  • Hello,

    All the errors above were reproduced, except for the two lines related to betheme. theme-head.php

  • Yes confirmed now, these 2 lines reproduced once more

    [05-Jan-2022 23:11:42 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/wp-content/themes/betheme/functions/theme-head.php on line 645

    [06-Jan-2022 03:34:32 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/wp-content/themes/betheme/functions/theme-head.php on line 645

  • I have contacted the dev team. Some of these warnings are related to the WP itself, and we cannot fix them.

    However, we will fix the ones that are related to the Betheme.


    Thanks

  • Thanks,

    I'll fix the ones related to WP. However, after updating WP to 5.8.3

    The following came up.

    [06-Jan-2022 23:58:23 UTC] PHP Warning:  Undefined array key "s" in /home/wp-content/themes/betheme/header.php on line 114
    [06-Jan-2022 23:58:23 UTC] PHP Warning:  Undefined array key "s" in /home/wp-content/themes/betheme/header.php on line 122
    [06-Jan-2022 23:58:23 UTC] PHP Warning:  Undefined array key "s" in /home/wp-content/themes/betheme/search.php on line 175
    
  • Thanks for reporting. I passed the information. 🙂


    Thanks

Sign In or Register to comment.