6.0.0-alpha12
6/13/25

[#9955] Editing a Contact in a SQL-Addressbook fails if no category is set
Summary Editing a Contact in a SQL-Addressbook fails if no category is set
Queue Turba
Queue Version 3.0.1
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester florian (at) brandner (dot) net
Created 04/22/2011 (5166 days ago)
Due
Updated 04/22/2011 (5166 days ago)
Assigned 04/22/2011 (5166 days ago)
Resolved 04/22/2011 (5166 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/22/2011 03:16:26 PM Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Resolved
 
04/22/2011 03:14:45 PM florian (at) brandner (dot) net Comment #3 Reply to this comment

[Show Quoted Text - 9 lines]
Yes, that fixed it! Don't know why it worked sometimes when I 
specified a category though...
Doesn't matter, problem solved :-) Thanks!
04/22/2011 03:04:12 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Can When trying to save a contact in a SQL-Addressbook without 
setting a Category, an error occurs and the contact is not saved.
Specifying a category in the contact before saving works.
Strange. I just fixed the exact opposite of this issue. Can you check 
to see if the following commit fixes things for you?

   
https://github.com/horde/horde/commit/dc3a1bc4c49e6d455facdf55c46913d86745b6fe#turba
04/22/2011 02:36:05 PM florian (at) brandner (dot) net Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Editing a Contact in a SQL-Addressbook fails if no category is set
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
When trying to save a contact in a SQL-Addressbook without setting a 
Category, an error occurs and the contact is not saved.

Output of the Horde.log:

2011-04-22T16:31:18+02:00 ERR: HORDE [turba] SQL QUERY FAILED: 
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an 
error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near ' object_notes = 
'', object_url = '', object_freebusyurl = '', object_pgppublicke' at 
line 1
        UPDATE turba_objects SET owner_id = 'flo', object_type = 'Object',
          object_members = NULL, object_uid =
          '<uid>@<domain>',
          object_firstname = 'Vorname', object_lastname = 'Nachname',
          object_middlenames = '', object_nameprefix = '', object_namesuffix =
          '', object_alias = '', object_bday = '2000-01-01', object_photo =
          NULL, object_phototype = NULL, object_homestreet = '', object_homepob
          = '', object_homecity = '', object_homeprovince = '',
          object_homepostalcode = '', object_homecountry = '', object_workstreet
          = '', object_workpob = '', object_workcity = '', object_workprovince =
          '', object_workpostalcode = '', object_workcountry = '', object_tz =
          '', object_email = 'name@domain.de', object_homephone =
          '+49-1234-5678', object_workphone = '+49-1234-5678',
          object_cellphone = '', object_fax = '', object_pager = '',
          object_title = '', object_role = '', object_company = 'Blah
          AG', object_logo = NULL, object_logotype = NULL, object_category = ,
          object_notes = '', object_url = '', object_freebusyurl = '',
          object_pgppublickey = '', object_smimepublickey = '' WHERE object_id =
          'oid' [pid 9898 on line 792 of "/usr/share/php/Horde/Db/Adapter/Base.php"]

Behind "object_category = " should be '' or NULL.

Specifying a category in the contact before saving works.

Saved Queries