Drupal 6 now sets the maxlength of taxonomy tags fields to 1024 characters on node create and edit forms. In the hs_taxonomy.module on line 272, maxlength is set to be 255 for those fields, essentially shrinking the accepted amount of characters.

This is a problem for 2 reasons. First, if you already had taxonomies in place when you installed hierarchical select, it prevents you from saving any content with tags of more than 255 characters. Second, just generally, users should be able to use the standard taxonomy length of core.

If you really wanted to improve, you could even look into providing an admin setting in which you could make a custom tag length. But clearly the default must be changed.

Comments

wim leers’s picture

Version: 6.x-3.x-dev » 6.x-3.5
Priority: Critical » Minor
Status: Active » Needs work

I had no idea there was this insane 1024 character limit. I think it might have changed with Taxonomy's upgrade path to Drupal 6. Most likely I *did* look at the DB schema details in D5, but didn't look at the upgrade path. Of course, I might have overlooked it in D5 as well. But terms of 1024 characters in length seem … absolutely insane, to be honest. Which is why I don't see the need to fix this myself.

Patch welcome :)

wim leers’s picture

No patch?

avaldivia’s picture

Title: Hierarchical Select sets the maxlength of taxonomy tags much lower than drupal core, causing many issues on some sites » Large taxonomy term names in several lines
Component: Code - Taxonomy » Miscellaneous
Category: bug » feature
Priority: Minor » Critical
Status: Needs work » Needs review
StatusFileSize
new28.54 KB

For theming issues... is it possible to display the taxonomy tags in more than one line when required?

The basic (theming)problem is that a "large" term name may break page display, so it would be nice to present a large term name in more than one line if needed.

Is it possible to solve this display problem with a simple code modification? In this case, where should this modification has to be done?

wim leers’s picture

What you're asking, is not supported by HTML.

wim leers’s picture

Status: Needs review » Active
drupalina’s picture

Version: 6.x-3.5 » 6.x-3.6

Hi,
I've ran into the same problem: if I have a free-tagging form on the same node-form where HS_taxonomy is present, then it won't allow me to enter more tags than a 255 charachters combined.

On line 278 I changed '#maxlength' => 255, to '#maxlength' => 1024, and the problem with tags went away.
(there are many reasons why people may choose to enter many-many tags so in total it would be more than 255: think about when people tag themselves with their interests and activities or think about image sites where people enter multiple tags instead of descriptions) -- So , IMHO, if Drupal core has it at 1024, then HS_taxonomy, should too.

wim leers’s picture

Priority: Critical » Minor
Status: Active » Postponed

Please roll a patch! :)

wim leers’s picture

Version: 6.x-3.6 » 6.x-3.x-dev
Component: Miscellaneous » Code
Issue tags: +HS4

Tagging for HS4. Included in the HS4 roadmap: http://drupal.org/node/1052670.

klonos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

This will happen in the 7.x branch.