Closed (fixed)
Project:
Web Links
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2007 at 20:50 UTC
Updated:
27 Oct 2007 at 01:21 UTC
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
Comment #1
gregglesI 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...)
Comment #2
bdragon commentedSchema bumped to 255 and form updated.
Comment #3
(not verified) commented