warning on creation of the cck field

pixelpreview - June 8, 2009 - 15:02
Project:CCK comment reference
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have this :

user warning: 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 '' at line 1 query: SELECT c.timestamp, c.cid, c.subject AS comment_title FROM comments c WHERE c.status = 0 AND c.subject LIKE '%%' ORDER BY in /.../modules/commentreference/commentreference.module on line 533.

#1

swentel - June 10, 2009 - 15:44

So, this is after submitting a new field which is comment reference ?
Did you choose autocomplete or select box ? And did you provide a default value ?

#2

swentel - June 10, 2009 - 17:16

Ok, I can reproduce the error when I choose the default_value with an autocomplete widget.
Note, it doesn't happen if you re-edit the field, looking for a solution now.

#3

swentel - June 10, 2009 - 17:30
Status:active» needs review

Can you try out the patch attached, should fix the issue. Note, only happens on creation, autocomplete en trying to select a default value.

AttachmentSize
485248.patch 2.72 KB

#4

pixelpreview - June 12, 2009 - 14:04

yes i will try the patch, you are right
the warning is only when i create the cck after it disappear definitively

#5

pixelpreview - June 12, 2009 - 14:17

thank you the patch it is perfect :-)

It will be fine in the future to have a little admin to modify the display for the comment reference module.
actualy i have modified your theme function because i want all the comment (user name, date, comment and title) with no link on the display.

I use your comment module to pick up a comment and show it in my body like a super comment :-)

thank you for your rapidity :-)

#6

swentel - June 12, 2009 - 14:27

Hmm, that's actually a nice feature, can you post that theming function otherwhise, I'll add an extra formatter function to include in the next release!

#7

swentel - June 13, 2009 - 11:05
Status:needs review» fixed

Fix committed to drupal 6 branch.

#8

System Message - June 27, 2009 - 11:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.