[sumomo] fix groups so you don't get internal 500 error when accessing the profiles of people in groups

RESOLVED FIXED

Status

support.mozillamessaging.com Graveyard
General
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: rolandtanglao, Assigned: sancus)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

:gozer, :sancus has the details on how to fix this

steps to reproduce:

1. internal server error when you access somebody in groups e.g.
https://support.mozillamessaging.com/en-US/user/4

2. but internal server error when you access somebody who is NOT in groups
e.g.
https://support.mozillamessaging.com/en-US/user/8

here's what sancus wrote in IRC about this:
[15:15] <sancus> just need to query in the data for each group
[15:15] <sancus> mysql> describe groups_groupprofile;
[15:15] <sancus> +------------------+--------------+------+-----+---------+----------------+
[15:15] <sancus> | Field            | Type         | Null | Key | Default | Extra          |
[15:15] <sancus> +------------------+--------------+------+-----+---------+----------------+
[15:15] <sancus> | id               | int(11)      | NO   | PRI | NULL    | auto_increment | 
[15:15] <sancus> | slug             | varchar(80)  | NO   | UNI | NULL    |                | 
[15:15] <sancus> | group_id         | int(11)      | NO   | MUL | NULL    |                | 
[15:15] <sancus> | information      | longtext     | NO   |     | NULL    |                | 
[15:15] <sancus> | information_html | longtext     | NO   |     | NULL    |                | 
[15:15] <sancus> | avatar           | varchar(250) | YES  |     | NULL    |                | 
[15:15] <sancus> +------------------+--------------+------+-----+---------+----------------+
[15:15] <sancus> 6 rows in set (0.02 sec)
[15:15] <sancus> but I need gozer to do it anyway
Assignee: nobody → gozer
mysql> describe groups_groupprofile;
+------------------+--------------+------+-----+---------+----------------+
| Field            | Type         | Null | Key | Default | Extra          |
+------------------+--------------+------+-----+---------+----------------+
| id               | int(11)      | NO   | PRI | NULL    | auto_increment |
| slug             | varchar(80)  | NO   | UNI | NULL    |                |
| group_id         | int(11)      | NO   | MUL | NULL    |                |
| information      | longtext     | NO   |     | NULL    |                |
| information_html | longtext     | NO   |     | NULL    |                |
| avatar           | varchar(250) | YES  |     | NULL    |                |
+------------------+--------------+------+-----+---------+----------------+

mysql> select * from groups_groupprofile;
Empty set (0.00 sec)
Assignee: gozer → sancus
:sancus still getting this error, any update?
https://support.mozillamessaging.com/de/user/13630 (is another example user)
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Duplicate of this bug: 702921

Comment 5

6 years ago
same error for me 

https://support.mozillamessaging.com/en-US/user/4596

can you please fix this asap
(Assignee)

Comment 6

6 years ago
gozer: Can you do a "SELECT * from auth_groups;" and post the output? 

This should be fixable by inserting data into groups_groupprofile but I need the ids for the groups to make sure they match up.
Assignee: sancus → gozer
(Assignee)

Comment 7

6 years ago
er, I meant auth_group not groups
mysql> select * from auth_group;
+----+----------------+
| id | name           |
+----+----------------+
|  8 | Contributors   |
|  2 | Locale leaders |
|  6 | Reviewers      |
+----+----------------+
Assignee: gozer → sancus
(Assignee)

Comment 9

6 years ago
OK, now run:

INSERT INTO groups_groupprofile VALUES(1, 'Contributors', 8, 'Contributors', 'Contributors', '');
INSERT INTO groups_groupprofile VALUES(2, 'Locale Leaders', 2, 'Locale Leaders', 'Locale Leaders', '');
INSERT INTO groups_groupprofile VALUES(3, 'Reviewers', 6, 'Reviewers', 'Reviewers', '');
Assignee: sancus → gozer
mysql> select * from groups_groupprofile;
+----+----------------+----------+----------------+------------------+--------+
| id | slug           | group_id | information    | information_html | avatar |
+----+----------------+----------+----------------+------------------+--------+
|  1 | Contributors   |        8 | Contributors   | Contributors     |        |
|  2 | Locale Leaders |        2 | Locale Leaders | Locale Leaders   |        |
|  3 | Reviewers      |        6 | Reviewers      | Reviewers        |        |
+----+----------------+----------+----------------+------------------+--------+
3 rows in set (0.00 sec)
Assignee: gozer → sancus
Can this be resolved now ?
i still get internal server error 500 when i go here
https://support.mozillamessaging.com/en-US/user/4

so IMHO still not fixed

:sancus has this been rolled out to production?
(Assignee)

Comment 13

6 years ago
Yeah I don't think it fixed it all the way, even though it did stop the error spam I was getting from the server... I'll look into it. This is not fixed yet.
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.