SQL error in hCalendar

Found a bug? Tell us!!
Post Reply
ads
Regular
Posts: 91
Joined: Sun Oct 29, 2006 11:39 am

SQL error in hCalendar

Post by ads » Thu Apr 23, 2020 12:35 am

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.

Post Reply