-
AuthorPosts
-
October 5, 2023 at 5:11 pm #1421518
One of our sites is continually getting the below error. Any ideas what’s going on with the term_id? Could it have something to do with Woo Commerce also being installed?
Error message:
Attempt to read property “term_id” on intError:
in require called at /nas/content/live/mywtenfold/wp-includes/template.php (787)
in load_template called at /nas/content/live/mywtenfold/wp-includes/template.php (720)
in locate_template called at /nas/content/live/mywtenfold/wp-includes/general-template.php (206)
in get_template_part called at /nas/content/live/mywtenfold/wp-content/themes/enfold/single.php (51)
in include called at /nas/content/live/mywtenfold/wp-includes/template-loader.php (106)
in require_once called at /nas/content/live/mywtenfold/wp-blog-header.php (19)
in require called at /nas/content/live/mywtenfold/index.php (17)October 6, 2023 at 1:56 am #1421564Hi mgyura,
I tried to check on your website however I don’t see the issue showing, is it only showing on the backend?
Best regards,
NikkoOctober 6, 2023 at 12:59 pm #1421630Correct, we use New Relic and this is where we’re getting the errors from.
Here’s a quick video of the errors we’re seeing:
October 9, 2023 at 2:28 am #1421848Hi mgyura,
It seems the error is somehow related to Woocommerce as you mentioned before:
– https://stackoverflow.com/questions/73290406/warning-attempt-to-read-property-term-id-on-int-woocommerceCan you give us a copy /nas/content/live/mywtenfold/index.php ?
or if you can setup a staging site for us, that would help us try to debug the issue.Best regards,
NikkoOctober 10, 2023 at 6:04 pm #1422036The site is a subsite on a multisite. I could migrate it to a dev standalone, but that would take some work. Let me know if that step is needed and I will get it done.
Here’s the contents of the /nas/content/live/mywtenfold/index.php:
<?php
/**
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*//**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( ‘WP_USE_THEMES’, true );/** Loads the WordPress Environment and Template */
require __DIR__ . ‘/wp-blog-header.php’;October 12, 2023 at 5:02 am #1422176Hi mgyura,
Thanks, that’s I think the normal content of index.php of WordPress, I don’t see anything wrong with it.
Can setup a staging site for us? and give us admin and FTP access for it, so it would help us try to debug the issue.Best regards,
NikkoOctober 12, 2023 at 5:17 pm #1422252Thank you for your help. I’ve setup a dev site here with a copy. This is on its own install so feel free to break the internet with it. Just let me know what you find and when I can take it down.
October 18, 2023 at 7:44 am #1422849Hi mgyura,
Thanks for setting up a staging site.
The problem is coming from related-posts.php of your child theme (under includes folder).
I have modified it and it seems to fix the issue, can you try to backup related-posts.php of your child theme on the live site and replace it with the one in the staging site, let us know if it helps.Best regards,
NikkoOctober 23, 2023 at 9:46 pm #1423477Thank you very much! Great catch.
-
AuthorPosts
- The topic ‘Attempt to read property “term_id” on int’ is closed to new replies.