[FIXED] Log error - SG version 2.08

DOA

Member
This comes up in the logs on group page loading. I've imported from xenforo 1 on earlier version of social groups with success and stepped up versions to SG 2.08 version today. This is the first time I'm seeing such errors.

Code:
Error: Call to a member function canViewContent() on null src/addons/Truonglv/Groups/Entity/Post.php:41
Generated by: Unknown account May 4, 2019 at 3:14 PM
Stack trace
#0 src/addons/Truonglv/Groups/Sitemap/Post.php(41): Truonglv\Groups\Entity\Post->canView()
#1 src/XF/Sitemap/Builder.php(182): Truonglv\Groups\Sitemap\Post->isIncluded(Object(Truonglv\Groups\Entity\Post))
#2 src/XF/Sitemap/Builder.php(147): XF\Sitemap\Builder->writeContentTypeData('tl_group_post', 9000, G)
#3 src/XF/Sitemap/Builder.php(82): XF\Sitemap\Builder->buildType('tl_group_post', G)
#4 src/XF/Job/Sitemap.php(25): XF\Sitemap\Builder->build(G)
#5 src/XF/Job/Manager.php(253): XF\Job\Sitemap->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(45) "https://testdomain.net/groups/groupname.14/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Truonglv

Staff member
Tech Support
Seem you have some orphan posts (posts did not belong to any groups). I will change some code to prevent this error.
 

Thread view new threads

Top