Topic on Extension talk:Contribution Scores

Jump to navigation Jump to search

Critical: Does not work in 1.18

3
86.61.12.125 (talkcontribs)

With enabled $wgShowSQLErrors in LocalSettings.php:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:


SELECT user_id, user_name, page_count, rev_count, page_count+SQRT(rev_count-page_count)*2 AS wiki_rank FROM user u JOIN ((SELECT rev_user, COUNT(DISTINCT rev_page) AS page_count, COUNT(rev_id) AS rev_count FROM revision WHERE rev_timestamp > '20120925235315' AND rev_user NOT IN (SELECT ipb_user FROM ipblocks WHERE ipb_user <> 0) AND rev_user NOT IN (SELECT ug_user FROM user_groups WHERE ug_group='bot') GROUP BY rev_user ORDER BY page_count DESC LIMIT 50) UNION (SELECT rev_user, COUNT(DISTINCT rev_page) AS page_count, COUNT(rev_id) AS rev_count FROM revision WHERE rev_timestamp > '20120925235315' AND rev_user NOT IN (SELECT ipb_user FROM ipblocks WHERE ipb_user <> 0) AND rev_user NOT IN (SELECT ug_user FROM user_groups WHERE ug_group='bot') GROUP BY rev_user ORDER BY rev_count DESC LIMIT 50)) s ON (user_id=rev_user) ORDER BY wiki_rank DESC LIMIT 50


from within function "". Database returned error "1: near "UNION": syntax error".

12.25.107.2 (talkcontribs)

I am getting the same thing in 1.24

A database query error has occurred. This may indicate a bug in the software.

  • Query:
    SELECT user_id, user_name, user_real_name, page_count, rev_count, page_count+SQRT(rev_count-page_count)*2 AS wiki_rank FROM user u JOIN ((SELECT rev_user, COUNT(DISTINCT rev_page) AS page_count, COUNT(rev_id) AS rev_count FROM revision WHERE rev_timestamp > '20151203135947' AND rev_user NOT IN (SELECT ipb_user FROM ipblocks WHERE ipb_user <> 0) AND rev_user NOT IN (SELECT ug_user FROM user_groups WHERE ug_group='bot') GROUP BY rev_user ORDER BY page_count DESC LIMIT 50) UNION (SELECT rev_user, COUNT(DISTINCT rev_page) AS page_count, COUNT(rev_id) AS rev_count FROM revision WHERE rev_timestamp > '20151203135947' AND rev_user NOT IN (SELECT ipb_user FROM ipblocks WHERE ipb_user <> 0) AND rev_user NOT IN (SELECT ug_user FROM user_groups WHERE ug_group='bot') GROUP BY rev_user ORDER BY rev_count DESC LIMIT 50)) s ON (user_id=rev_user) ORDER BY wiki_rank DESC LIMIT 50
  • Function: DatabaseBase::query
  • Error: 1 near "UNION": syntax error
2001:638:208:2301:E9CB:4927:E660:1F2C (talkcontribs)

For me the same in 1.32; do you maybe need a MySQL database instead of a SQLite database?

Reply to "Critical: Does not work in 1.18"