The autocomplete form of the taxonomy module
limits the max characters to 255, regardless of the actual underlying limits
$form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield',
'#title' => $vocabulary->name,
'#description' => $help,
'#required' => $vocabulary->required,
'#default_value' => $typed_string,
'#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid,
'#weight' => $vocabulary->weight,
'#maxlength' => 255,
);
this means we cannot update a node which has e.g. 400 characters set up with different
(generated) tags
I suggest to upper this limit to something a lot bigger - e.g. 2047 or so
thanks!
Comments
Comment #1
Christoph C. Cemper commentedanyone else got this?
Comment #2
benovic commentedyes, i have that problem, too.
on my site its also a little diseaster because i use community_tagging on the site. the module allows tags up to more than 255 chars, but then the node is no more editable.
is this fixed yet?
Comment #3
benovic commentedoh i just learned that this is very easily fixed by a mini module:
http://www.drupalcenter.de/node/7395#comment-27059
Comment #4
LAsan commentedChristoph C. Cemper: Still an issue?
Comment #5
slideaway commentedSince I don't speak german could someone spell out a little better what this mini-module fix entails? I see the bit of code, but where do I go about implementing it into my site? This is a somewhat critical issue on my site, as I definitely need the ability to tag more then the alloted limit.
Comment #6
slideaway commentedAnyone?
Comment #7
neclimdulMake a small module(most sites have one of these to put small pieces of code in already) and do something along these lines:
Comment #8
tetty commentedI managed to solve this by changing the #maxlength value in the taxonomy module.
I then deleted my existing tags vocabulary and created another, which then had an increased maxlength
Comment #9
deadrich commentedGreat tip, this solved the problem for me. Just a note, be sure to change VID to your taxonomy ID.
Comment #10
roychri commentedHere is something a bit more generic.
You do not have to modify the code (ie. VID), it work as-is.
It's more documented so hackers can dig in.
This is for Drupal 5 only
Installation Instructions as a new module
Installation Instructions in an existing module
Configuration
If you need more (or less) than 1024, simply change the value in your variable table like this:
Warning: The SQL above might only work in MySQL. I do not know if progresql support REPLACE.
Truncating the cache table allow your new value to take effect.
Comment #11
summit commentedWould be great to have this in D6 also!
Greetings, Martijn
Comment #12
bdsl commentedI've just had to do this in D6, and it just needs a slight change from the D5 version above:
Comment #13
hefox commentedThe limit isn't 255 in d6, it's like 1k. Something else was likely happening?
Comment #14
neclimdulConfirmed, its 1024:
Its possible someone is trying to put more then 1k characters of tags but thats a lot of tags...
Going to go out on a limb and mark this WF. We don't support 5.x, there's a posted workaround, and it doesn't really exist in > 6.x.