Auto-filled menu item description (and title) doesn't check length

Oliver Coleman - July 28, 2008 - 02:37
Project:Edit term
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

If there's no pre-existing menu item then the menu item description is auto-filled with the term description. At the moment there's no check to see if the term description is longer than the allowed menu item description (128 characters).

This can be fixed by cropping the term description as put into the menu item description by changing line 292 in edit_term.module from

'#default_value' => $item['description'] ? $item['description'] : $term->description,

to

'#default_value' => $item['description'] ? $item['description'] : substr($term->description, 0 , 128),

#1

dman - September 27, 2008 - 06:42
Version:5.x-1.0» 5.x-1.1
Status:active» fixed

Yep, true enough. That bothered me a little also.
Committed to D5 DEV (not yet in the release bundle)

AttachmentSize
edit_term-issue_287955.patch 802 bytes

--project followup subject--

Anonymous (not verified) - October 11, 2008 - 06:54

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

#2

Anonymous (not verified) - October 11, 2008 - 07:03
Status:fixed» closed

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

#3

Oliver Coleman - January 4, 2009 - 01:38
Status:closed» needs review

Still a problem in 5.x-1.1

#4

Oliver Coleman - January 4, 2009 - 01:38
Title:Auto-filled menu item description doesn't check length» Auto-filled menu item description (and title) doesn't check length

Also, this applies to the menu title, too (though I suppose one is much less likely to have a 128 character long term title).

 
 

Drupal is a registered trademark of Dries Buytaert.