Page MenuHomePhabricator

Issues with abusefilter + MW 1.24 + postgresql: Doesn't define af_group, af_id definition
Closed, ResolvedPublic

Description

I was told on IRC to report this, so here goes.

Installing AbuseFilter-REL1_24-782f0f8.tar.gz on a wiki using:
MediaWiki 1.24.1
PHP 5.6.5 (cgi-fcgi)
PostgreSQL 9.3.5

  1. When navigating to Special:AbuseFilter
Query:
SELECT af_id,af_enabled,af_deleted,af_global,af_public_comments,af_hidden,af_hit_count,af_timestamp,af_user_text,af_user,af_actions,af_group FROM "abuse_filter" WHERE af_deleted = '0' ORDER BY af_id LIMIT 51
Function: IndexPager::buildQueryInfo (AbuseFilterPager)
Error: 42703 ERROR: column "af_group" does not exist LINE 1: ...ount,af_timestamp,af_user_text,af_user,af_actions,af_group ... ^

This is because the abusefilter.tables.pg.sql doesn't define the af_group like the abusefilter.tables.sql does.
Alter table abuse_filter add column af_group text; fixes the immediate problem...

  1. Trying to import a new rule results in this: SELECT af_hidden FROM "abuse_filter" WHERE af_id = 'new' LIMIT 1

Which is acknowledged at the top of abusefilter.tables.pg.sql

However, even in MYSQL af_id is defined as a BIGINT - so looks like the query is just wrong, even for MYSQL.

Event Timeline

Nangel created this task.Feb 14 2015, 12:46 AM
Nangel raised the priority of this task from to Normal.
Nangel updated the task description. (Show Details)
Nangel added a project: AbuseFilter.
Nangel added a subscriber: Nangel.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 14 2015, 12:46 AM
Aklapper renamed this task from Multiple issues with abusefilter + mediawiki 1.24 + postgresql to Issues with abusefilter + MW 1.24 + postgresql: Doesn't define af_group, af_id definition.Feb 20 2015, 11:02 AM
Aklapper lowered the priority of this task from Normal to Low.
Aklapper updated the task description. (Show Details)
Aklapper set Security to None.

Change 191947 had a related patch set uploaded (by Jjanes):
PostgreSQL: Add missing columns for AbuseFilter

https://gerrit.wikimedia.org/r/191947

Patch-For-Review

Change 192002 had a related patch set uploaded (by Jjanes):
PostgreSQL: Fix magic-value code for AbuseFilter

https://gerrit.wikimedia.org/r/192002

Patch-For-Review

Change 192002 merged by jenkins-bot:
PostgreSQL: Fix magic-value code for AbuseFilter

https://gerrit.wikimedia.org/r/192002

Jjanes added a subscriber: Jjanes.May 14 2016, 9:19 PM

Why does this say it was closed by me? I didn't do anything to close it, and the commit it says I made to close it has not been merged, so the issue remains as far as I can tell.

Change 288807 had a related patch set uploaded (by Jjanes):
PostgreSQL: Add missing columns for AbuseFilter

https://gerrit.wikimedia.org/r/288807

Aklapper reopened this task as Open.May 15 2016, 9:56 AM
Jjanes reopened this task as Open.May 20 2016, 9:58 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.

Change 191947 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] PostgreSQL: Add missing columns for AbuseFilter

https://gerrit.wikimedia.org/r/191947

Change 288807 abandoned by Umherirrender:
PostgreSQL: Add missing columns for AbuseFilter

Reason:
REL1.27 is out of support, new LTS is REL1.31

https://gerrit.wikimedia.org/r/288807