christian-putzke / Roundcube-CardDAV

Roundcube CardDAV Plugin
http://www.graviox.de
GNU Affero General Public License v3.0
119 stars 28 forks source link

Postgres Error #61

Open basti122303 opened 10 years ago

basti122303 commented 10 years ago

Hello, i use davical 1.1.1-1 on debian wheezy and the Roundcube CardDAV plugin 0.5.1 in Roundcube Webmail 0.9.3 and Postgres 8.4 as database.

First of all I do this fix: https://github.com/graviox/Roundcube-CardDAV/issues/29

After that I get the following postgres error:

FEHLER: ungültige Eingabesyntax für ganze Zahl: »« ZEILE 8: carddav_contact_id = ' ' \ Fehler **

In english: syntax error @ LINE8: carddav_contact_id = ''

So I change the following in carddav_addressbook.php:

186 $query = " 187 SELECT 188 * 189 FROM 190 ".get_table_name('carddav_contacts')." 191 WHERE 192 user_id = ? 193 "; 194 // AND 195 // carddav_contact_id = ? 196 // ";

I don't know what this line is doing but now it works for me. It seem that there is no carddav_contact_id available. Please fix this.

basti122303 commented 10 years ago

It seem that this lines are usefull for search / delete entry but insert a contact return carddav_contact_id = '' ^ (SQL Query: SELECT * FROM carddav_contacts WHERE user_id = '1'

        AND
            carddav_contact_id = ''
    ) in /.../program/lib/Roundcube/rcube_db.php on line 416 (POST /?_orig_source=carddav_addressbook1?_task=addressbook&_action=save)