Last modified: 2013-06-18 13:36:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25600, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23600 - Nuke extension w/PostgreSQL: column "recentchanges.rc_timestamp" should be in GROUP BY
Nuke extension w/PostgreSQL: column "recentchanges.rc_timestamp" should be in...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Nuke (Other open bugs)
unspecified
All All
: Low major (vote)
: MW 1.19 version
Assigned To: Nobody - You can work on this!
:
: 23618 (view as bug list)
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2010-05-19 22:52 UTC by Dan Nessett
Modified: 2013-06-18 13:36 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Error message from SpecialNuke extension for MW1.13/postgres (1.77 KB, text/plain)
2010-05-20 02:57 UTC, Dan Nessett
Details
SQL error for updated code (1.68 KB, text/plain)
2010-05-20 14:45 UTC, Dan Nessett
Details

Description Dan Nessett 2010-05-19 22:52:03 UTC
Downloading the version of Nuke specified for 1.13 yields incorrect extension code. The download is Nuke-MW1.13-r37906.tar.gz. When expanded, all routines are named SpecialNuke*.php. They are supposed to be named Nuke*.php (according to the installation instructions). When I modified the instructions to require_once(../Nuke/SpecialNuke.php) and tried to use the extension, I get a db error.

The SQL is attempting to access columns rc_log_type and rc_log_action. However, these columns (in table recentchanges) don't exist. There are columns rc_log_type_text and rc_log_action_text. The SQL appears to be corrupt, since the error message specifies it can't find column "upload".
Comment 1 Platonides 2010-05-19 23:09:00 UTC
The names were changed last month (r65214). On 1.13 the names were SpecialNuke.

The columns on 1.13 are called rc_log_type and rc_log_action
http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_13/phase3/maintenance/tables.sql?view=markup

How did you create your mw table? It dosn't see any rc_log_action_text column...
Comment 2 Sam Reed (reedy) 2010-05-19 23:18:19 UTC
And FYI, 1.13 is out of date and not supported
Comment 3 Dan Nessett 2010-05-19 23:39:17 UTC
(In reply to comment #1)
> The names were changed last month (r65214). On 1.13 the names were SpecialNuke.
> 
> The columns on 1.13 are called rc_log_type and rc_log_action
> http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_13/phase3/maintenance/tables.sql?view=markup
> 
> How did you create your mw table? It dosn't see any rc_log_action_text
> column...

OK.

However, the documentation for installing the extension states to add the following line to LocalSettings.php:

require_once("$IP/extensions/Nuke/Nuke.php");

see: http://www.mediawiki.org/wiki/Extension:Nuke

So, someone should update it.

Is it possible the SQL you cite is for MySQL? We are running over Postgres. When I use pgAdmim to look at the tables, there isn't one called mw. (There is one called mwuser, however).
Comment 4 Platonides 2010-05-19 23:50:17 UTC
> So, someone should update it.

It is updated. You are using an outdated extension.

> Is it possible the SQL you cite is for MySQL? We are running over Postgres.
> When I use pgAdmim to look at the tables, there isn't one called mw. (There is
> one called mwuser, however).

I suspected so. But even on postgres they have those names, http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_13/phase3/maintenance/postgres/tables.sql?view=markup

They are however of type text, so perhaps the output you saw was concatenating them.
Comment 5 Dan Nessett 2010-05-20 00:17:17 UTC
(In reply to comment #4)
> > So, someone should update it.
> 
> It is updated. You are using an outdated extension.
> 

Are you stating that there is functionality now in the core (of versions greater than 1.13) that implements the Nuke function? Or is there a newer extension (name?) that works only on versions that do not include 1.13?

> > Is it possible the SQL you cite is for MySQL? We are running over Postgres.
> > When I use pgAdmim to look at the tables, there isn't one called mw. (There is
> > one called mwuser, however).
> 
> I suspected so. But even on postgres they have those names,
> http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_13/phase3/maintenance/postgres/tables.sql?view=markup
> 
> They are however of type text, so perhaps the output you saw was concatenating
> them.

Yes, that was the problem. The pgAdmin utility was cramming together the column name and its type. So, the substance of this bug ticket now rests on whether the Nuke extension is supported at all, is supported only for more recent versions of MW than 1.13 or whether 1.13 code is still available.

In all cases, I think the extension description page needs to be updated. In the first case, a deprecated/no support banner would be helpful. In the second case the download options should be modified to eliminate 1.13 and lower. In the third case, then the ticket describes a legitimate problem.
Comment 6 Sam Reed (reedy) 2010-05-20 00:20:39 UTC
I was referring to MediaWiki itself

You mentioned 1.13, but 1.15.3 is the current stable, with 1.16 just around the corner.

Per Platonides, the documentation refers to the current trunk installation. In most cases, this is fine for stable, but can be wrong for unsupported older versions

See http://www.mediawiki.org/w/index.php?title=Extension:Nuke&action=historysubmit&diff=323969&oldid=317365

Which is correct
Comment 7 Dan Nessett 2010-05-20 00:25:49 UTC
(In reply to comment #6)
> I was referring to MediaWiki itself
> 
> You mentioned 1.13, but 1.15.3 is the current stable, with 1.16 just around the
> corner.
> 
> Per Platonides, the documentation refers to the current trunk installation. In
> most cases, this is fine for stable, but can be wrong for unsupported older
> versions
> 
> See
> http://www.mediawiki.org/w/index.php?title=Extension:Nuke&action=historysubmit&diff=323969&oldid=317365
> 
> Which is correct

Thanks. I guess since that page is so new it hasn't made it up the SEO ladder.
Comment 8 Dan Nessett 2010-05-20 00:31:06 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > > So, someone should update it.
> > 
> > It is updated. You are using an outdated extension.
> > 

By the way, the release status side-bar on the new description page states the supported versions for the extension are: "1.11+, verified under 1.16 beta". So, either that should be changed so it isn't misleading or the download pulldown menu needs to reference a release of the extension that works on 1.13
Comment 9 Dan Nessett 2010-05-20 02:57:06 UTC
Created attachment 7388 [details]
Error message from SpecialNuke extension for MW1.13/postgres

Under the assumption that the side-bar on the new extension description page is correct and the extension should work for MW 1.13, the attachment presents the error text appearing when the extension is used for the user "Dummy User1".
Comment 10 Platonides 2010-05-20 14:09:29 UTC
It gives the error "Column upload does not exist", but on the SQL upload is not a column name, but a *content* that you compare with text fields.

SELECT rc_namespace,rc_title,rc_timestamp,COUNT(rev_id) AS edits FROM recentchanges LEFT JOIN revision ON ((rc_cur_id=rev_page)) WHERE rc_user_text = 'Dummy User1' AND ((rc_new = 1) OR (rc_log_type = "upload" AND rc_log_action = "upload")) GROUP BY rc_namespace, rc_title, rc_timestamp ORDER BY rc_timestamp DESC

ERROR: column "upload" does not exist

Seems that Postgres doesn't support double quotes for constants.

http://www.postgresql.org/docs/8.4/interactive/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
> A string constant in SQL is an arbitrary sequence of characters bounded by 
> single quotes ('), for example 'This is a string'. To include a single-quote 
> character within a string constant, write two adjacent single quotes, e.g., 
> 'Dianne''s horse'. Note that this is not the same as a double-quote character (").

Double quotes are used to delimit identifiers.

I have fixed it on the trunk version at r66693.

Apparently, that version should work even for an old one like 1.13, so give it a try.
Comment 11 Dan Nessett 2010-05-20 14:45:58 UTC
Created attachment 7390 [details]
SQL error for updated code

Now I get a different error message. Its attached.
Comment 12 Dan Nessett 2010-05-20 14:46:37 UTC
Reopening, since code change didn't fix problem.
Comment 13 Platonides 2010-05-21 16:37:38 UTC
*** Bug 23618 has been marked as a duplicate of this bug. ***
Comment 14 Sumana Harihareswara 2011-11-02 15:56:02 UTC
Are you still experiencing this error with MediaWiki 1.17.0?
Comment 15 Dan Nessett 2011-11-02 17:47:44 UTC
(In reply to comment #14)
> Are you still experiencing this error with MediaWiki 1.17.0?

We are running 1.16.2, so I haven't checked to see if the problem exists in 1.17.0. Right now I am swamped with other things, so it isn't likely I will be able to check 1.17.0 in the near future.
Comment 16 Marcin Cieślak 2012-03-08 12:13:16 UTC
Doesn't seem to be fixed in trunk as of r111298
Comment 17 Marcin Cieślak 2012-03-08 13:29:56 UTC
Fixed in r113364

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links