Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
nodereference.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 May 2009 at 20:42 UTC
Updated:
25 Jun 2010 at 11:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
neilnz commentedAttached a patch that I used to fix this issue for me (replaced LIKE with ILIKE when using pgsql)
Comment #2
jamespharaoh commentedThe previous patch submitted will change the word LIKE indiscriminately throughout the SQL statement. My patch, attached, will only change it where appropriate.
Comment #3
neilnz commentedBacked out my patch from #1 and applied #2, confirmed working as expected on Postgres 8.3.7.
Comment #4
neilnz commentedThis is still an issue in latest 2.x-dev and 3.x-dev. Could someone please apply this?
Comment #5
carpo commentedJust came across this issue myself, and noticed that the change also has to be made in the function content_plugin_display_references in content_plugin_display_simple.inc and the function _userreference_potential_references_standard in userreference.module
Comment #6
karens commentedSounds like this patch is not complete and no one has confirmed that it doesn't break things in MYSQL.
Comment #7
josh waihi commented#2 will work fine in PostgreSQL and will not effect MySQL. I RTBC this, but it is also an issue in user reference. could we get that fixed there too?
Comment #8
karens commentedI marked this needs work because #5 says there are more places that need to be fixed, so the patch is not ready. Does 'will not affect MYSQL' mean you actually tested it or are you just guessing?
Comment #9
neilnz commentedHere's a new patch, incorporating the fix from #2 in those other places
Comment #10
neilnz commentedI just tested this patch on MySQL and Postgres on a fresh install of Drupal 6 CVS with CCK 2.x-dev from the project page both with and without the patch.
I created two fields on the default page type, a nodereference autocomplete ("contains") and a similar userreference autocomplete field.
I created a page and user with mixed case title/username and then attempted to reference them.
MySQL was case-insensitive both before and after the patch, Postgres was case sensitive before but not after, so I'm very confident that my patch from #9 doesn't affect MySQL, and solves both nodereference and userreference autocomplete case sensitivity issues on Postgres.
Thanks
Comment #11
karens commentedThanks for the very complete patch and report, fixed committed.
Comment #12
Fidelix commentedThe patch returned:
patching file cck/includes/views/handlers/content_plugin_display_simple.inc
Hunk #1 FAILED at 22.
1 out of 1 hunk FAILED -- saving rejects to file cck/includes/views/handlers/content_plugin_display_simple.inc.rej
patching file cck/modules/nodereference/nodereference.module
Hunk #1 FAILED at 876.
1 out of 1 hunk FAILED -- saving rejects to file cck/modules/nodereference/nodereference.module.rej
patching file cck/modules/userreference/userreference.module
Hunk #1 FAILED at 774.
1 out of 1 hunk FAILED -- saving rejects to file cck/modules/userreference/userreference.module.rej
Sorry if its my noobiness.
Comment #13
neilnz commented@Fidelix, make sure you're using CCK 6.x-2.x-dev, otherwise this patch won't apply and you'll have to backport it manually.
The changes are relatively minor (6 lines changed across 3 files), so you should be able to do it by hand if you need to.
Comment #14
karens commentedThe patch is committed. If you use the dev version it is there.
Comment #15
Fidelix commentedSorry, i was using 3.x. My bad.