Skip to Content Skip to Menu

GroupJive 4.0.0: SQL 1064 viewing another member's profile (duplicate AND)

  • mjl1817
  • mjl1817
  • ONLINE
  • Posts: 56
  • Thanks: 7
  • Karma: 1
1 hour 41 minutes ago #344636 by mjl1817
Hi Kyle,

We tried to submit this through the GroupJive bug tracker, but forge.joomlapolis.com/login returned “Forbidden”, so we are reporting it here instead.

After installing CB GroupJive 4.0.0, build 2026-10-12, we found a reproducible SQL error when a signed-in member views another member's CB profile with the GroupJive Communities tab enabled.

The profile fails with MySQL error 1064, with the error pointing near:
AND ( g.`user_id` = ... OR ( g.`published` = 1 AND ...

Reproduction:
1. Install GroupJive 4.0.0 and enable its profile Communities tab.
2. Sign in as an ordinary frontend member.
3. Open another member's profile.
4. The profile fails while GroupJive loads its community rows.

In library/Tab/GroupTab.php, around line 286, the row-query permissions condition is added to $queryWhere with a leading "AND ( g.". Around line 303, the array is joined using implode(" AND ", $queryWhere), producing a duplicate conjunction (AND AND).

The minimal change is:
Code:
Before: "AND ( g." After: "( g."


The corresponding count-query condition earlier in the same file already begins with "( g.", without the extra AND.

We confirmed the defective line is present in the unmodified supplied GroupJive 4.0.0 ZIP and that our installed file matched that source before applying the temporary one-line correction. No permission predicates were removed. PHP syntax validation passed, and profiles then loaded successfully for signed-in viewers, including an ordinary member viewing their own and another member's profile.

Environment: Community Builder 2.12.0, GroupJive 4.0.0 (2026-10-12), PHP 8.3.33. Activity 7.1.1 and Gallery 4.1.3 are also installed.

Could you confirm this and include the correction in the next release? We have kept the original file and can provide the patch if useful.

Thanks!

I wish I knew, Then we would both know.

Please Log in or Create an account to join the conversation.

Moderators: beat, nant, krileon
Powered by Kunena Forum