$term_id Error
-
Stock locations works perfect, but I am running into issues with it conflicting with other aspects of my website. Our programmer looked into it and said that it’s erroring out on line 261 of your stock-locations-for-woocommerce/stock-locations-for-woocommerce.php file.
“The $term_id returns a NULL value”Are you able this?
The page I need help with: [log in to see the link]
-
I am surprised that your programmer is telling you the wrong line number, maybe you are modifying the files on your end. Correct line number is 266 and it is not producing any error, I would request you to come up with a solution instead of reporting these things, troubleshooting takes time my friend.
Anyways, please replace that line with the following one and let me know about the outcomes. And please ask your programmer to understand this line, we are storing the value, which can be zero, not null, into the $term_id variable. We need it further, there is no return thing is being used.
$term_id = (int)(is_archive()?get_queried_object_id():0);Definitely not modifying it on our end. Changed the code with what you posted and it didn’t fix the issue. If I deactivate your plugin then no error… you can see it without error in our dev environment with your plugin deactivated.
Error in Live: https://www.owlbooks.dk/best-sellers/?term_taxonomy_id=34
Dev: https://staging-1685720091.owlbooks.dk/best-sellers/?term_taxonomy_id=36Anyway, thought you would be able to see the issue without too much trouble. But if not, then just close the ticket out as unresolved. That’s Cool. No big deal my friend.
You are pointing out the wrong line number, please check the following file and tell me the correct line. I am not getting this error.
https://plugins.trac.wordpress.org/browser/stock-locations-for-woocommerce/trunk/stock-locations-for-woocommerce.phpI replaced the code here:
http://staging-1685720091.owlbooks.dk/wp-content/uploads/image.jpgDoens’t matter where you replaced it, actually your dev site is telling me the line number 289 where actually the error is
https://www.owlbooks.dk/best-sellers/?term_taxonomy_id=34
So what is the line number 289 in your dev site, ask your developer to give me a screenshot of that file, I want to know about the line number 289.
Also please use the help tab on the settings page, there is an option of urgent help to look into these kind of matters.
If you notice, line 289 here is different from yours
https://plugins.trac.wordpress.org/browser/stock-locations-for-woocommerce/trunk/stock-locations-for-woocommerce.phpI am surprised that the same code is giving me the term_id as 0 without any problem.
Try the following:$term_id = (int)(is_archive()?get_queried_object_id():0);
$term_id = is_numeric($term_id)?$term_id:0;
And ask your developer to use https://developer.wordpress.org/reference/functions/is_wp_error/ to handle this and let me know which solutions works so I can add that improvement in the next version, this is the blind way to handle the issue, kindly use the urgent help option instead. I doubt there is some other problem on your page.STILL UNRESOLVED.
That didn’t help either. Still throws up all kinds of errors and conflicting with other plugins. We’ve decided to drop your plugin because it’s causing way too many issues.I certainly offered you the support beyond the common practices but you even reply with your convenience and like to report the issues only. Nobody else reported the same issues which means, your WordPress environment has something to be reviewed, conflicts are never related to one plugin scripts, there are other aspects need to be considered.
The nature of the issue reported wasn’t resolvable as you were expecting, I tried to respond quickly, provided you the possible fixes but actually you were never interested in troubleshooting. This plugin is an open source solution, everyone can contribute in it, reporting issues aren’t the only option. If your developer couldn’t find the reason behind this issue, I was here to troubleshoot but you chose the strict pattern of just reporting.
Thank you
The topic ‘$term_id Error’ is closed to new replies.