• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Fixed Missing relation for trending content handler

Kirby

Member
Showcase
UBS
UBS Version
2.3.8
XenForo Version
2.3.6
PHP Version
8.3.20
Database & Version
MariaDB 10.11.11
Are there any errors being throw?
No
XenAddons\UBS\TrendingContent\BlogEntryHandler::getEntityWith() does not include relation Blog, this causes additional queries for each distinct blog as BlogEntry canView calls Blog canView
 
Whoops! It does now ;) Nice catch!

PHP:
    public function getEntityWith(string $style): array
    {
        $visitor = \XF::visitor();

        return [
            'Blog',
            'Category',
            'Category.Permissions|' . $visitor->permission_combination_id
        ];
    }


Also added the missing Blog relation to the Featured Content Handler XenAddons\UBS\FeaturedContent\BlogEntryItem::getEntityWith()

PHP:
    public function getEntityWith(): array
    {
        $visitor = \XF::visitor();
    
        return [
            'Blog',
            'Category',
            'Category.Permissions|' . $visitor->permission_combination_id,
            'User',
        ];
    }
 
Back
Top