Last modified: 2013-09-02 20:21:43 UTC
I have SocialProfile from SVN (84866), PostgreSQL 8.4.7 and Mediawiki 1.16.2 Tables in base are created, but at calling on page of the user I receive an error: A database error has occurred Query: SELECT ug_id,ug_user_id_from,ug_user_name_from,ug_gift_id,ug_date,ug_status,gift_name,gift_description,gift_given_count,UNIX_TIMESTAMP(ug_date) AS unix_time FROM user_gift INNER JOIN gift ON ((ug_gift_id = gift_id)) WHERE (ug_user_id_to = 2) ORDER BY ug_id DESC LIMIT 4 OFFSET 0 Function: UserGifts::getUserGiftList Error: 1 ERROR: function unix_timestamp(timestamp with time zone) does not exist LINE 1: ...tatus,gift_name,gift_description,gift_given_count,UNIX_TIMES... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Backtrace: 0 /var/www/site/public_html/includes/db/Database.php(538): DatabasePostgres->reportQueryError('ERROR: functio...', 1, 'SELECT ug_id,u...', 'UserGifts::getU...', false) 1 /var/www/site/public_html/includes/db/Database.php(874): DatabaseBase->query('SELECT ug_id,u...', 'UserGifts::getU...') 2 /var/www/site/public_html/extensions/SocialProfile/UserGifts/UserGiftsClass.php(327): DatabaseBase->select(Array, Array, Array, 'UserGifts::getU...', Array, Array) 3 /var/www/site/public_html/extensions/SocialProfile/UserProfile/UserProfilePage.php(920): UserGifts->getUserGiftList(0, 4) 4 /var/www/site/public_html/extensions/SocialProfile/UserProfile/UserProfilePage.php(69): UserProfilePage->getGifts('DuskMan') 5 /var/www/site/public_html/includes/Wiki.php(493): UserProfilePage->view() 6 /var/www/site/public_html/includes/Wiki.php(70): MediaWiki->performAction(Object(OutputPage), Object(UserProfilePage), Object(Title), Object(User), Object(WebRequest)) 7 /var/www/site/public_html/index.php(117): MediaWiki->performRequestForTitle(Object(Title), Object(UserProfilePage), Object(OutputPage), Object(User), Object(WebRequest)) 8 {main}
This is a known issue. Mark suggested in http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75007#c11339 using a Database method (Database::unixTimestamp) instead of UNIX_TIMESTAMP, and I implemented his suggestion in http://www.mediawiki.org/wiki/Special:Code/MediaWiki/77339), but the said method was removed in r79345 so I had to revert my changes in r79748. I'm not aware of a replacement for Database::unixTimestamp() though. :-(
svn 96716, PostgreSQL 8.4.8, Mediawiki 1.17 There was other error: PHP Parse error: syntax error, unexpected T_ELSE, expecting T_FUNCTION in /var/www/mediawiki/public_html/extensions/SocialProfile/UserProfile/UserProfilePage.php on line 885, referer: http://example.com/wiki/Special:Version
That'd be a serious issue, except that I'm not getting it; my local copy of UserProfilePage.php (r96720) passes php -l. Have you done any local customizations? What version of PHP are you using?
(In reply to comment #3) > That'd be a serious issue, except that I'm not getting it; my local copy of > UserProfilePage.php (r96720) passes php -l. Have you done any local > customizations? What version of PHP are you using? PHP 5.3.3 (Debian squeeze). Have you done any local customizations - No.
Now everything is working
(In reply to comment #5) > Now everything is working Does that mean that this bug can be closed?
*** This bug has been marked as a duplicate of bug 27732 ***