Posted by meneteqel on April 16, 2007 at 8:50pm
3 followers
Jump to:
| Project: | Web Links |
| Version: | 5.x-1.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
URLs can only have a maximum of 64 characters. This is to short for many URLs.
The German newspaper FAZ for example has URLs like this:
http://www.faz.net/s/RubDDBDABB9457A437BAA85A49C26FB23A0/Doc~EEC2C353D05...
But already an example like this is one character too long:
http://www.upgrade-cepis.org/issues/2006/6/upgrade-vol-VII-6.html
The reason is the definition of the form field in weblinks.module line 355-361:
$form['url'] = array('#type' => 'textfield',<br>
'#title' => t('URL'),<br>
'#default_value' => $node->url,<br>
'#maxlength' => 64,<br>
'#description' => t('The description can provide additional information about the link.'),<br>
'#required' => TRUE,<br>
);
The database field has the type of varchar(155). So the form field should also have a maxlength of 155.
In my opinion 155 characters is still too short. I'd prefer varchar(255) for storing URLs or the text type where string length doesn't matter.
Comments
#1
I marked http://drupal.org/node/139377 as a dupicate of this issue.
Note that in that issue the user provides a similar possible fix.
I think 155 makes more sense given the size of the db field. Or, ideally that it should use a column like "text" to hold unlimited length urls (cause they can get long...)
#2
Schema bumped to 255 and form updated.
#3