Closed (fixed)
Project:
Nodequeue
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2010 at 19:10 UTC
Updated:
18 May 2011 at 07:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
bdurbin commentedRan into the same issue. The above patch worked for us.
Comment #2
schnippy commentedHad the same problem and the above patch is working for us. The autocomplete form field is only saving the nid in the nodequeue tables (so no database schema issues) but the validation error is coming from javascript because its counting the text of the title in the autocomplete field and not just the node number value, ex:
"A ridiculously long title that is breaking my design and really ought to be edited down to something a little more manageable and readable [nid:201]"This patch works but might break again if I have a node title that is exactly 255 characters as autocomplete will add the [nid:201] to the string, which will trigger the javascript validation.
Comment #3
mcarbone commentedI think it should be increased arbitrarily to something like 500 to handle the problem mentioned by schnippy in comment #2 (and other problems such as character encodings). It's not as if that title gets added to the database at any point anyway -- it's merely used as a guide for the user as only the nid is really important.
Comment #4
gnindl commentedYou can also calculate the maxlength automatically based on the highest node. This is slightly less performant but a more elegant solution
Comment #5
mcarbone commentedThat doesn't address character encoding issues caused by check_plain. For instance, pull up a node title with an ampersand or left/right arrow and suddenly you have something legitimate over 255 characters in that box. I admit, however, that this is an edge case.
Comment #6
jrabeemer commented+1
This is a big bug that I see on my site as well.
Comment #7
jaydub commentedI think it would be fine to simply make the maxlength something like 255 + X w/o worrying about finding the actual max length in the node table per #4. Would 300 be more than enough to allow for the [nid: YYYYYYYYY] and any encoding? Seems like a simple fix here...
Comment #8
jrabeemer commentedIncreasing priority. This bug is a show stopper on one of my projects. If you use auto-node-title module against long content, which in turn creates long node titles, this bug becomes apparent.
Comment #9
jrabeemer commented300 characters would leave an integer number YYY at 37 places. Up to sextillion nodes in ASCII? :) What would be the worst case unicode title?
Comment #10
amateescu commentedCore's taxonomy.module uses a maxlength of 1024 in
taxonomy_field_widget_form()and I think this is a good example to follow.If someone really needs to exceed that limit, they can always use
hook_form_alter()to adjust this value.Edit: Although taxonomy.module uses this limit for terms, this solution was also adopted by the Drupal Commerce module in #1115994: Increase product reference autocomplete textfield maxlength from 128 to unlimited.
Comment #11
amateescu commentedCommited to 6.x and 7.x.
http://drupalcode.org/project/nodequeue.git/commit/04d8ff8
http://drupalcode.org/project/nodequeue.git/commit/5eb8896