Author: overlordq
Description:
When querying the API with the parameters:
action=feedwatchlist
as given in the example, the following is output:
XML Parsing Error: junk after document element
Location: http://www.thedarkcitadel.com/w/api.php?action=feedwatchlist
Line Number 2, Column 1:<b>Warning</b>: pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: invalid input syntax for type timestamp with time zone: "20071215162455" in <b>/home/wiki/includes/DatabasePostgres.php</b> on line <b>531</b><br />
Viewing the raw output of the page will include this snippet:
<item>
<title>Error (internal_api_error)</title> <link></link> <description>A database error has occurred
Query: SELECT rc_cur_id,rc_this_oldid,rc_namespace,rc_title,rc_timestamp,rc_user,rc_user_text,rc_comment FROM watchlist,page,recentchanges WHERE (wl_namespace = rc_namespace) AND (wl_title = rc_title) AND (rc_cur_id = page_id) AND wl_user = '1' AND rc_deleted = '0' AND (rc_timestamp>='20071215162455') AND (rc_this_oldid=page_latest) ORDER BY rc_timestamp DESC LIMIT 51
Function: ApiQueryWatchlist::run
Error: 1 ERROR: invalid input syntax for type timestamp with time zone: "20071215162455"
</description>
</item>
Looking at that query it looks like we have yyyymmddhhmmss but no timezone.
The RC table is defined as timestamp *with* timezone.
Version: 1.12.x
Severity: major