We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Updating Mailbox/Message incompatible with Mysql 5.0 [Solved] | Forum

Ilja
Ilja Aug 26 '14
Hi,


New mailbox module uses GREATEST() function which is not available in 5.0 Mysql. 


[Tue Aug 26 19:19:10 2014] [ow_core_log] [Exception] Message: SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION kin_17.GREATEST does not exist File:/home/admin/v17.kin.om/ow_core/database.php Line:707 Trace: [#0 /home/admin/v17.kin.om/ow_core/database.php(707): PDOStatement->execute() | #1/home/admin/v17.kin.om/ow_core/database.php(398): OW_Database->execute(' SELECT `conv`....', Array) | #2 /home/admin/v17.kin.om/ow_plugins/mailbox/bol/conversation_dao.php(411):OW_Database->queryForList(' SELECT `conv`....', Array) | #3 /home/admin/v17.kin.om/ow_plugins/mailbox/bol/conversation_service.php(2741):MAILBOX_BOL_ConversationDao->findConversationItemListByUserId(1598, Array, 0, 10) | #4 /home/admin/v17.kin.om/ow_plugins/mailbox/bol/conversation_service.php(2192):MAILBOX_BOL_ConversationService->getConversationListByUserId(1598, 0, 10) | #5 /home/admin/v17.kin.om/ow_plugins/mailbox/bol/conversation_service.php(2110):MAILBOX_BOL_ConversationService->getLastDataAlt(Array) | #6 /home/admin/v17.kin.om/ow_plugins/mailbox/classes/event_handler.php(872): MAILBOX_BOL_ConversationService->getLastData(Array) | #7/home/admin/v17.kin.om/ow_core/event_manager.php(200): MAILBOX_CLASS_EventHandler->onPing(Object(OW_Event)) | #8 /home/admin/v17.kin.om/ow_system_plugins/base/controllers/ping.php(20):OW_EventManager->trigger(Array, Object(OW_Event)) | #9 /home/admin/v17.kin.om/ow_core/request_handler.php(263): BASE_CTRL_Ping->index(Object(OW_Event)) | #10/home/admin/v17.kin.om/ow_core/application.php(327): OW_RequestHandler->dispatch(Array) | #11 /home/admin/v17.kin.om/index.php(73): OW_Application->handleRequest(Array, Array) | #12{main}]



So please update requirements or downgrade the code.


The Forum post is edited by Ilja May 21 '16
Ilja
Ilja Aug 26 '14
I have temporarily changed the line:


ORDER BY GREATEST ( COALESCE(`initiatorMessage`.`timeStamp`, 0), COALESCE(`interlocutorMessage`.`timeStamp`, 0) ) DESC


to:

           

/* ORDER BY GREATEST ( COALESCE(`initiatorMessage`.`timeStamp`, 0), COALESCE(`interlocutorMessage`.`timeStamp`, 0) ) DESC
*/ORDER BY `initiatorMessage`.`timeStamp` DESC
in findConversationByKeyword() and findConversationItemListByUserId() functions in ow_plugins/mailbox/bol/conversation_service.php file. But waiting for the team fix.

ross Team
ross Aug 27 '14

in the file ow_plugins/mailbox/bol/conversation_dao.php

replace this line: 

 ORDER BY GREATEST ( COALESCE(`initiatorMessage`.`t

with

 ORDER BY GREATEST( COALESCE(`initiatorMessage`.`t


without a space between GREATEST and (


usually a server ignores that, however you probably have server settings which do not ingore spaces. 

Ilja
Ilja Aug 27 '14
Thanks! I've got and update which has this issue solved already.
ross Team
ross Aug 27 '14
Great. I'm going to mark this post as Solved