Bug [E_WARNING] Attempt to read property "node_id"

Status
Not open for further replies.

CuriousFiend

Customer
LogicException: Unknown relation or alias Item accessed on xf_xa_sc_item in src/XF/Mvc/Entity/Finder.php at line 768

XF\Mvc\Entity\Finder->join() in src/XF/Mvc/Entity/Finder.php at line 659

XF\Mvc\Entity\Finder->with() in src/XF/Mvc/Entity/Manager.php at line 149

XF\Mvc\Entity\Manager->find() in src/XF/App.php at line 2874

XF\App->findByContentType() in src/XF/Poll/AbstractHandler.php at line 40

XF\Poll\AbstractHandler->getContent() in src/XF/Entity/Poll.php at line 180

XF\Entity\Poll->getContent() in src/addons/DBTech/Credits/EventTrigger/Poll.php at line 99

DBTech\Credits\EventTrigger\Poll->rebuild() in src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php at line 856

DBTech\Credits\EventTrigger\AbstractHandler->rebuildEntities() in src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php at line 804

DBTech\Credits\EventTrigger\AbstractHandler->rebuildRange() in src/addons/DBTech/Credits/Job/TransactionRebuild.php at line 88

DBTech\Credits\Job\TransactionRebuild->run() in src/XF/Job/Manager.php at line 260

XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202

XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 118

XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 122

XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352

XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259

XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115

XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57

XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487

XF\App->run() in src/XF.php at line 524

XF::runApp() in admin.php at line 13
 
Alrighty, so Bob from Xenaddons pointed to a poll in a Showcase item which I've just deleted and seems to have been the reason for the above error, but continuing the rebuilt now gives this error:

ErrorException: [E_WARNING] Attempt to read property "node_id" on null in src/addons/DBTech/Credits/EventTrigger/React.php at line 133

XF::handlePhpError() in src/addons/DBTech/Credits/EventTrigger/React.php at line 133

DBTech\Credits\EventTrigger\React->rebuild() in src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php at line 856

DBTech\Credits\EventTrigger\AbstractHandler->rebuildEntities() in src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php at line 804

DBTech\Credits\EventTrigger\AbstractHandler->rebuildRange() in src/addons/DBTech/Credits/Job/TransactionRebuild.php at line 88

DBTech\Credits\Job\TransactionRebuild->run() in src/XF/Job/Manager.php at line 260

XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202

XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 86

XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 141

XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352

XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259

XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115

XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57

XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487

XF\App->run() in src/XF.php at line 524

XF::runApp() in admin.php at line 13


Any ideas?
 
Alrighty, so Bob from Xenaddons pointed to a poll in a Showcase item which I've just deleted and seems to have been the reason for the above error, but continuing the rebuilt now gives this error:
This to me indicates you have a post that's orphaned from its thread. I don't know if XenForo has any way of rectifying this.

You can run this query to look for orphaned posts:
SQL:
SELECT xf_post.*
FROM xf_post
LEFT JOIN xf_thread USING(thread_id)
WHERE xf_thread.thread_id IS NULL
 
This to me indicates you have a post that's orphaned from its thread. I don't know if XenForo has any way of rectifying this.

You can run this query to look for orphaned posts:
SQL:
SELECT xf_post.*
FROM xf_post
LEFT JOIN xf_thread USING(thread_id)
WHERE xf_thread.thread_id IS NULL
Thank you, I'll go show this to the devs I usually hire and will let you know asap if/when they figure out a way to fix this.
 
😅 Sorry man, I haven't gotten this sorted yet.
Paid a guy to do the query thing almost two weeks ago and I gave him your example to use, though I'm still waiting for him to actually do it.

Was going to try doing it myself today, except I just can't seem to figure out what an SQL query is or where to do it and Google keeps giving me what seems to be advanced results for people who are already familiar with this stuff.
 
This to me indicates you have a post that's orphaned from its thread. I don't know if XenForo has any way of rectifying this.

You can run this query to look for orphaned posts:
SQL:
SELECT xf_post.*
FROM xf_post
LEFT JOIN xf_thread USING(thread_id)
WHERE xf_thread.thread_id IS NULL
Just had a guy take a look at the issue and he's suggested that I inform you of the results of his investigation, as follows:

Screenshot_2023-12-29-06-09-10-67_40deb401b9ffe8e1df2f1cc5ba480b12.webp
Screenshot_2023-12-29-06-09-24-71_40deb401b9ffe8e1df2f1cc5ba480b12.webp


switch ($entity->content_type)
{
case 'post':
/** @var \XF\Entity\Post $contentInfo */
if ($contentInfo && $contentInfo->Thread) { // Check if $contentInfo and $contentInfo->Thread are not null
$nodeId = $contentInfo->Thread->node_id;
} else {
// Handle the situation when there is no thread or the contentInfo is null
$nodeId = 0; // or handle appropriately as per your logic
}
break;
}


Screenshot_2023-12-29-06-09-48-36_40deb401b9ffe8e1df2f1cc5ba480b12.webpScreenshot_2023-12-29-06-09-57-26_40deb401b9ffe8e1df2f1cc5ba480b12.webp

😅I ain't got no idea what most of that means.
 
That reply looks like it was written by ChatGPT 😛 If it's not possible for you to clean up your database by removing the orphaned posts, I'll have to add additional checks to my code :D

I'll keep this open and post back when I have more information or if I need additional information.
 
That reply looks like it was written by ChatGPT 😛 If it's not possible for you to clean up your database by removing the orphaned posts, I'll have to add additional checks to my code :D

I'll keep this open and post back when I have more information or if I need additional information.
🙂Oh awesome mate! Thank you so much.
(I'll have to see if I can flick ya a donation after this post)

PS: Regarding GPT, 😂man my Chatbot definitely doesn't provide helpful feedback... I've been trying to train it as the ultimate sh_tposting counter-troll.

Here's an example:
(warning, there's a bit of *humourously intended naughty language...)

May I present...
Screenshot_2023-12-29-06-35-42-71_e4424258c8b8649f6e67d283a50a2cbc.webpScreenshot_2023-12-29-06-36-07-45_e4424258c8b8649f6e67d283a50a2cbc.webpScreenshot_2023-12-29-06-36-34-66_e4424258c8b8649f6e67d283a50a2cbc.webpScreenshot_2023-12-29-06-36-52-28_e4424258c8b8649f6e67d283a50a2cbc.webpScreenshot_2023-12-29-06-37-14-44_e4424258c8b8649f6e67d283a50a2cbc.webp
 
Sorry, I haven't been able to find a donation option so far.

🤔Tbh I'm thinking I could just buy another DBTech add-on—but then not download it—and this would essentially equate to being a donation.
 
That reply looks like it was written by ChatGPT 😛 If it's not possible for you to clean up your database by removing the orphaned posts, I'll have to add additional checks to my code :D

I'll keep this open and post back when I have more information or if I need additional information.
Hey I was wondering whether I should hit up XF support about cleaning up this orphaned post.

Obviously I don't know how this works, or how a post even becomes orphaned, but I'm assuming if it's something we can clean up ourselves if we had access to the database—then since in this case being on XF cloud, therefore XF can access & clean this orphaned post.(?)
 
Sorry for the delay, I'm unable to release a new version right now as I'm waiting on feedback from a client with regards to custom work, but I've applied a patch to v5.8.5 that should fix the specific error you're encountering.

I'll have a more comprehensive fix that would prevent all possible instances of the error in the future, but for now you can re-download v5.8.5 and re-import it using the package installer to resolve the error you experienced.
 
Hello @CuriousFiend,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Hello @CuriousFiend,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
Aye?
Nah don't close this ticket just yet, coz I'm still patiently waiting for the comprehensive fix mentioned in post #11.

Eg:
Sorry for the delay, I'm unable to release a new version right now as I'm waiting on feedback from a client with regards to custom work, but I've applied a patch to v5.8.5 that should fix the specific error you're encountering.

I'll have a more comprehensive fix that would prevent all possible instances of the error in the future, but for now you can re-download v5.8.5 and re-import it using the package installer to resolve the error you experienced.
 
Have you tried downloading v5.8.5 again like I mentioned?
Yessir.

I am currently under the impression that it was a temporary solution.(?)

Additionally I am unable to tell whether the rebuild corrected the error or not—because apparently one of the developers I'd hired to try fix it, has done something to bypass the specific DBTech Credits error notifications, ie: so they aren't showing up anymore.

So as of now I'm basically just assuming the rebuild hopefully fixed the issue and am patiently waiting for the comprehensive fix to be released so that I can be certain.
 
I am currently under the impression that it was a temporary solution.(?
No, it's not a temporary solution. It patches the specific error you encountered, so as long as you don't use any other (potentially) affected parts of DB Credits, you will run into no more errors.

Additionally I am unable to tell whether the rebuild corrected the error or not—because apparently one of the developers I'd hired to try fix it, has done something to bypass the specific DBTech Credits error notifications, ie: so they aren't showing up anymore.
It would help if you undid those changes as I won't be able to assist with any further issues you may encounter when you're running a modified version of the software.
 
No, it's not a temporary solution. It patches the specific error you encountered, so as long as you don't use any other (potentially) affected parts of DB Credits, you will run into no more errors.
Oh, ok cool.

It would help if you undid those changes as I won't be able to assist with any further issues you may encounter when you're running a modified version of the software.
I have no idea what he did to stop the errors showing up.
If he modified something, would the rebuild not have overwritten it?
 
It should, but it won't overwrite templates.
Ahh yeah I see.

Wish he'd informed me about this potential.
I'm really not keen pay him more to come back & undo whatever he did aye mate.

Frankly as much as I love these add-ons, they're too complex for me to deal with when things go wrong.
Tbh, it's probably best I give up on them.

🤔...yeah, I'm going to attempt to uninstall them both now....😅hopefully this goes smoothly.
 
Hello @CuriousFiend,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Credits

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
5,018
Customer rating
5.00 star(s) 5 ratings
Back
Top