[buddypress-trac] [BuddyPress Trac] #9136: Blogs loop not working property when blog has no description

buddypress-trac noreply at wordpress.org
Thu Apr 18 10:40:01 UTC 2024


#9136: Blogs loop not working property when blog has no description
--------------------------+-----------------------------
 Reporter:  lenasterg     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Blogs         |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Hi.
 I noticed that the queries used in bp-blogs/classes/class-bp-blogs-
 blog.php
 in lines https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
 blogs/classes/class-bp-blogs-blog.php#L274
 and https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
 blogs/classes/class-bp-blogs-blog.php#L290 don't
 return blogs that don't have a 'description'.
 Also due to many LEFT JOINS the queries for largescale installations are
 slow.
 In the proposed pull request,
 the LEFT JOIN for bm_description:
 - is needed only if we have search_terms
 - it uses LEFT JOIN ... ON (b.blog_id = bm_description.blog_id **AND
 bm_description.meta_key = 'description'**) so if a blog doesn't have a
 description in wp_bp_user_blogs_blogmeta it will be included in the
 results

 Bests,
 Lena

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9136>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list