Page 1 of 1

SQL error in hCalendar

Posted: Thu Apr 23, 2020 12:35 am
by ads
Hello,

I'm running S9y on PostgreSQL, and I see the following error in my log:

Code: Select all

SELECT * FROM serendipity_entryproperties WHERE property LIKE 'mf_hCalendar_%' AND entryid IN (SELECT entryid FROM serendipity_entryproperties WHERE property = 'mf_hCalendar_startdate' AND value > (1587593847 - 259200))
ERROR:  operator does not exist: text > integer
LINE 1: ...ERE property = 'mf_hCalendar_startdate' AND value > (1587593...
That error happens because the "value" field in "public.serendipity_entryproperties" is of type "TEXT", and the comparisation is for a number.

Probably the easiest way to fix that error is to cast "value" to an INT or BIGINT:

Code: Select all

AND value::INT >
However I can't quite figure out where this query is generated, otherwise I would provide a patch.