[PostgreSQL] New charts feature crashes

RESOLVED FIXED in Bugzilla 2.20



13 years ago
13 years ago


(Reporter: jonaliz55, Assigned: LpSolit)


Bugzilla 2.20
Bug Flags:
approval +
approval2.20 +



(1 attachment)



13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705; Googlebot; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Googlebot)
Build Identifier: Bugzilla ver 2.20

Error received follows:

Software error:
DBD::Pg::db selectall_arrayref failed: ERROR:  Attribute series.series_id must be GROUPed or used in an aggregate function [for Statement "SELECT cc1.name, cc2.name, series.name, series.series_id FROM series INNER JOIN series_categories AS cc1     ON series.category = cc1.id INNER JOIN series_categories AS cc2     ON series.subcategory = cc2.id LEFT JOIN category_group_map AS cgm     ON series.category = cgm.category_id     AND cgm.group_id NOT IN(-1, 3, 7, 10, 5, 1, 8, 11, 4, 2, 6, 9) WHERE creator = 1 OR       cgm.category_id IS NULL GROUP BY series_id, cc1.name, cc2.name, series.name"] at Bugzilla/Chart.pm line 316
	Bugzilla::Chart::getVisibleSeries() called at /var/www/html/bugzilla/chart.cgi line 306
	main::view('Bugzilla::Chart=HASH(0x890a330)') called at /var/www/html/bugzilla/chart.cgi line 116

Reproducible: Always

Steps to Reproduce:
2.Select New Charts option

Actual Results:  
Received error as in Details section above

Expected Results:  
Expected to see chart/report

Results of checksetup script follow:

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.56
Checking for             CGI (v2.93)   ok: found v3.15
Checking for    Data::Dumper (any)     ok: found v2.12
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.38)   ok: found v1.50
Checking for      File::Spec (v0.84)   ok: found v3.14
Checking for      File::Temp (any)     ok: found v0.13
Checking for        Template (v2.08)   ok: found v2.14
Checking for      Text::Wrap (v2001.0131) ok: found v2001.0929
Checking for    Mail::Mailer (v1.65)   ok: found v1.67
Checking for        Storable (any)     ok: found v2.06

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v1.41
Checking for     Chart::Base (v1.0)    ok: found v2.3
Checking for     XML::Parser (any)     ok: found v2.31
Checking for       GD::Graph (any)     ok: found v1.43
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (v0.9.4)  ok: found v0.9.5

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for         DBD::Pg (v1.31)   ok: found v1.32
Checking for      PostgreSQL (v7.03.0000) ok: found v07.03.2000

Populating duplicates table...

Comment 1

13 years ago
I cannot reproduce neither on my local installation using PostgreSQL 8.0.4 nor on landfill (using Pg 7.4.8 IIRC). 'series_id' is in the GROUP BY clause but without the 'series.' prefix. This doesn't make my Pg installations to crash though. It wouldn't hurt to do this change, but I wonder if the problem could appear in some other SQL queries as well.

mkanat, could it be a bug in Pg 7.3.2?
Severity: major → normal

Comment 2

13 years ago
JK, in Bugzilla/Chart.pm, at line 328, could you replace 




and tell us if this fixes the problem for you? If yes, we will add this change in the official releases.

Comment 3

13 years ago
It fixed the problem initially in that it takes me to the "Create Chart" screen, but when I select "Add to List" in the "Create Chart" screen I receive the following error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Comment 4

13 years ago
You probably forgot to run ./checksetup.pl after your change in Chart.pm. Look at your error log to see what really happened. Anyway, this is unrelated to your previous problem. I will post a patch with this change.
Assignee: gerv → LpSolit
Blocks: 314490
Ever confirmed: true
Summary: New charts feature crashes → [PostgreSQL] New charts feature crashes
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.20

Comment 5

13 years ago
Created attachment 209024 [details] [diff] [review]
patch, v1

Applies on both tip and 2.20.
Attachment #209024 - Flags: review?(mkanat)

Comment 6

13 years ago
Comment on attachment 209024 [details] [diff] [review]
patch, v1

r+ when reporter reports that he has *no* problem.

Comment 7

13 years ago
JK, we are waiting on your reply, see comment 4. We are going to release 2.20.1 next week, so we haven't a lot of time to commit this patch.

Comment 8

13 years ago
I ran checksetup and it solved the problem. The solution in coment 2 below was successful.
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME

Comment 9

13 years ago
If my patch fixes your problem, then this bug is not WFM! Reopening!
Resolution: WORKSFORME → ---

Comment 10

13 years ago
Comment on attachment 209024 [details] [diff] [review]
patch, v1

Great. Let's go ahead with it.
Attachment #209024 - Flags: review?(mkanat) → review+


13 years ago
Flags: approval?
Flags: approval2.20?
(In reply to comment #9)
> If my patch fixes your problem, then this bug is not WFM! Reopening!

Just clarifying...  This means the bug really does exist, and the patch fixes it.  So the bug record should be closed as "fixed", not "worksforme", but we can't close it until said fix is actually checked into the codebase for the next release.
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+

Comment 12

13 years ago

Checking in Bugzilla/Chart.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Chart.pm,v  <--  Chart.pm
new revision: 1.11; previous revision: 1.10


Checking in Bugzilla/Chart.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Chart.pm,v  <--  Chart.pm
new revision:; previous revision: 1.8
Last Resolved: 13 years ago13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.