Bad edit link generation while using a date field as primary key
Fri, 02/11/2011 - 11:12
Hi!
Using a field date as a primary key generates edit links that raise a db error.
pg_query(): Query failed: ERROR: time zone displacement out of range: "Mar+03+1973"
LINE 14: "t0"."data" = 'Mar+03+1973'
The generated link is:
http://localhost/qcubed/drafts/tablename_edit.php/3/Mar+03+1973
using instead:
http://localhost/qcubed/drafts/delibereimpegno_edit.php/3/Mar-03-1973 it works.
I do not know qcubed internals as I'm a very new to it, hoping someone may fix that.
Regards.

Hello Nicola,
The reason for your problem is that your date is url-encoded which replaces any white space with pluses, but it does not get url-decoded in the MetaControl (In method CreateFromPathInfo).
I would suggest that you raise that issue as a ticket. That has probably not been mentioned as people usually use type integer for primary keys.
Helge
I should add that there would be a couple of work-arounds. In case you haven't found one yourself I'd be happy to help you out.
Sorry for late reply, I switched to a serial primary key and filed a ticket.
Thanks