Jump to content

Extension talk:Patroller

Unknown column 'ptr_timestamp' in 'where clause'

5
103.88.223.137 (talkcontribs)

I installed the master version of this extension on my site running on 1.34, but it seems not working for me and giving the following error:

[YJYsQHRHzDNxDujfl4prMwAAQwY] /wiki/Special:Patroller Wikimedia\Rdbms\DBQueryError from line 1603 of /includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT * FROM `page`,`recentchanges` WHERE (ptr_timestamp IS NULL) AND (rc_namespace = page_namespace) AND (rc_title = page_title) AND (rc_this_oldid = page_latest) AND (rc_user != 1) AND rc_bot = '0' AND rc_patrolled = '0' AND rc_type = '0' LIMIT 1

Function: SpecialPatroller::fetchChange

Error: 1054 Unknown column 'ptr_timestamp' in 'where clause'

I run the updater using SSH as well as web updater but nothing is working out. I also tried with different versions 1.31, 1.34 and master but all showing the same error. Can someone please point out if there is anything I'm not doing the right way or there is a bug?


Pigging the developers: @Developaws @Robchurch


Thank you in advance.

RobinHood70 (talkcontribs)

Something's gone wrong with your installation, then. It's looking for a "patrollers" table (which it's supposed to create during the install process) but not finding it. Did update.php give you any messages that might shed light on things?

103.88.223.137 (talkcontribs)

@RobinHood70 : Thank you for replying. I tired reinstalling the extension and this is what I see in the update.php

...patrollers table already exists.

No error message or anything like that. I'm also unable to locate it in Special:Version

Garuda3 (talkcontribs)

I have experienced the same problem when trying to install on Mediawiki 1.37

Vikasnd (talkcontribs)

I am getting the same issue and reverted changes since it does not work. Why not mark this extension unstable so people don't waste time on installing it.

Reply to "Unknown column 'ptr_timestamp' in 'where clause'"

Unknown column 'ptr_timestamp' in 'where clause'

3
Dberndtsoco (talkcontribs)

I'm really excited to use this extension but I'm getting an error:

/index.php/Special:Patroller Wikimedia\Rdbms\DBQueryError from line 160 includes/libs/rdbms/database/Database.php:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT * FROM `page`,`recentchanges` WHERE (ptr_timestamp IS NULL) AND (rc_namespace = page_namespace) AND (rc_title = page_title) AND (rc_this_oldid = page_latest) AND (rc_user != 9) AND rc_bot = '0' AND rc_patrolled = '0' AND rc_type = '0' LIMIT 1 Function: SpecialPatroller::fetchChange

Error: 1054 Unknown column 'ptr_timestamp' in 'where clause'

I ran the update.php already. Someone on another thread said to run SQL commands, but I'm not sure specifically what script I'm missing. Did I miss a step?

Kghbln (talkcontribs)
179.218.6.69 (talkcontribs)

The code has what appears to be a huge bug, wherein it can't possibly be passing even a basic test by a developer.


Go to extensions/Patroller/SpecialPatroller.php and around line 230 you will see a select function: "$res = $dbr->select("

Just below it where it says "[ $page, $recentchanges ]," change it to "[ $page, $recentchanges, $patrollers ],"

And then a few lines later where it says "rc_user" change it to "rc_actor" (rc_user is not a field and this can't possibly be passing any level of testing)


Final result will be:

$res = $dbr->select(

           [ $page, $recentchanges, $patrollers ],

           '*',

           [

               'ptr_timestamp IS NULL',

               'rc_namespace = page_namespace',

               'rc_title = page_title',

               'rc_this_oldid = page_latest',

               'rc_actor != ' . $uid,

               'rc_bot'        => '0',

               'rc_patrolled'  => '0',

               'rc_type'       => '0',

           ],

...


Those two changes make the SQL command valid.


For any devs: you have to include the table name in the first parameter *even if you join it later*. And rc_user isn't a field so that's just bunk no matter how you cut it :p

Reply to "Unknown column 'ptr_timestamp' in 'where clause'"
پاکنویس (talkcontribs)

this Extension not work...

please help/fix it

Reply to "its not work"
Novike (talkcontribs)

Does not work..

Reply to "There is a bug .."
ShinyComputers (talkcontribs)

Hello, after copying the folder to the extensions directory, adding the include to LocalSettings.php, and running php update.php, I get a database error on the Patroller page. I am on MediaWiki 1.34. The specific error I get is Error: 1054 Unknown column 'ptr_timestamp' in 'where clause' . What additional information should I provide? I love the idea of this extension and would love to use it.

Dberndtsoco (talkcontribs)

Were you able to fix this issue? I'm getting the same thing and can't find a solution.

Kghbln (talkcontribs)

No, it appears not. See the comment in this topic where the discussion should probably continue.

There are no older topics