AndrewSimm
Well-known member
I am working on a news add-on and can't seem to figure out something basic.
This code below gets me this error: "LogicException: Unknown relation XF:Thread accessed on xf_post in src/XF/Mvc/Entity/Finder.php at line 630"
If I exclude XF:Thread then it works fine, but I need the thread title, so I got to have that in there. I've checked XFost and it has a relation with XF:Thread
So what did I do wrong?
edit: $post_id is 1 FWIW
This code below gets me this error: "LogicException: Unknown relation XF:Thread accessed on xf_post in src/XF/Mvc/Entity/Finder.php at line 630"
If I exclude XF:Thread then it works fine, but I need the thread title, so I got to have that in there. I've checked XFost and it has a relation with XF:Thread
PHP:
$finder = \XF::finder('XF:Post');
$news = $finder->with('XF:Thread')->where('post_id',$post_id)->fetchOne();
So what did I do wrong?
edit: $post_id is 1 FWIW
Last edited: