Hello
there is a problem with advpoll and sqlite. Namely in the function advpoll_get_poll_info_blocks($blocks) on line 955.
for the module to be compatible the query should be split up or date("Y-m-s H:i:s", time()) would have to be used.
PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW: SELECT n.title, n.nid FROM {node} n LEFT JOIN {field_data_advpoll_dates} d ON d.revision_id = n.vid LEFT JOIN {field_data_advpoll_closed} c ON c.revision_id = n.vid LEFT JOIN {field_data_advpoll_options} o ON o.revision_id = n.vid WHERE n.type = 'advpoll' AND o.advpoll_options_value = 'block' AND n.status = 1 AND c.advpoll_closed_value = 'open' AND d.advpoll_dates_value < NOW() AND d.advpoll_dates_value2 > NOW() ORDER BY n.created DESC; Array ( ) in advpoll_get_poll_info_blocks() (line 969 of [...]\modules\advpoll\advpoll.module).
Comment | File | Size | Author |
---|---|---|---|
#3 | 2035035-3-advpoll.patch | 2.41 KB | dagmar |
Comments
Comment #1
tassoman CreditAttribution: tassoman commentedLooks like anyone isn't interested on sqlite. Shall we vote for it? :)
Comment #2
tripper54 CreditAttribution: tripper54 commentedPatches welcome!
Comment #3
dagmarHere is the patch.
Comment #4
heykarthikwithuThis can be achieved through date('now') or date("Y-m-d H:i:s"), reference https://www.sqlite.org/lang_datefunc.html.
so moving to RTBC.
Comment #5
tripper54 CreditAttribution: tripper54 commentedThe patch in #4 is wrong. @heykethikwithu , the date() function here is php's date() function , not sqlite's. So php's dates parses date('now') as 'show me the current date in the format now , ie monthYearmonth'. Which isn't what we're looking for.
I'll test the patch in #3 when time permits.
Comment #6
tripper54 CreditAttribution: tripper54 commented#3 needs re-rolling.