Drupal 6.15-16 (haven't looked at other versions).
Modules enabled: Taxonomy Menu (root module portion only)

I created three taxonomy menus, and with all settings being equal, one of them would not show up. The only difference between the three were the number of terms in each vocabulary, and the one that would not show up had ~80 terms, the other two far less. After a code and database review I came up with the following...

In the menu_links table, the link_path field is set to varchar(255). With the large number of taxonomy terms, this field was truncated. It's value is "taxonomy/term/123 456 789...". With so many terms, the field truncated the full term list, breaking the menu. I then changed the link_path field type from varchar(255) to longtext and now everything is working fine.

Comments

perandre’s picture

indytechcook’s picture

Title: Taxonomy menu not showing up and a fix. » Taxonomy menu not showing up and a fix (field length bug).
Status: Needs work » Active

Changing the title to remind me to fix this problem and truncate the value before I send to menu_link_save

arlinsandbulte’s picture

Note: I marked #523910: taxonomy menu disappears on large vocabularies as a duplicate of this issue.
That may not be 100% correct, but the fix in this issue will likely solve most of the problems over there.
That issue does have a longer history and more discussion, but this issue has a fix outlined.

indytechcook’s picture

Status: Active » Fixed

A fix is in version 2.6.

Status: Fixed » Closed (fixed)

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

jvieille’s picture

Status: Closed (fixed) » Active

This issue is not solved in 2.8 - the database has still the link_path field set to varchar(255)
I was deadly hit today...

Thanks for the fix.

indytechcook’s picture

Version: 6.x-2.5 » 6.x-2.x-dev

The fix that was in basically breaks the link. If the url is truncated then the path will not be correct.

Updating the table a core table is also something I'm not willing to do in this module.

We need a better fix, I'm just not sure what it would be.

hass’s picture

+

jvieille’s picture

Why the hell does taxonomy menu has to pass every single term in a url?

indytechcook’s picture

The URL is generated by the taxonomy module. NOT taxonomy menu.

jvieille’s picture

Such an optional update of a core table should not induce any risk.
Basically, a 255 character limit for urls is non-sense. This might hit again somewhere else

indytechcook’s picture

jvielle,

As with most parts of Drupal, it's not that simple. Following Drupal schema API (http://drupal.org/node/159605) the varchar field type is limited to 255 characters. To change the number of characters could also require the type of field. You are welcome to change the add an update hook in your own custom module to modify the table using http://drupal.org/node/150215 and http://drupal.org/node/150223 as a guide.

interestingaftermath’s picture

subscribe

roxflame’s picture

If your terms are in a hierarchy and you havn't tagged any nodes with the parent items (ie you only have parent terms for structure).
Then if you have the "Hide empty terms" option on for that vocabulary, it'll hide (disable in menu tree) your parent terms, thus not showing any of the children either.
Either tag items to the parents, turn this option off, or re-enable the parent items in the menu you selected after your rebuild.

johnv’s picture

Title: Taxonomy menu not showing up and a fix (field length bug). » For large vocabularies, Taxonomy menu does not show up due to too-long URL (and a fix for the field length bug)

More explicit title.
An alternative solution might be #1668388: Use 'all' at the end of URL not working

dstol’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The Drupal 6 version is no longer supported