I did a quick search just now. Seems 255 indeed is far beneath the standard. 2048 is a number that, to me, sticks out... perhaps 2000.

http://www.boutell.com/newfaq/misc/urllength.html

mdlueck

CommentFileSizeAuthor
#6 weblinks.zip22.18 KBnancydru
#2 weblinks34.patch2.23 KBnancydru

Comments

mdlueck’s picture

Subscribe...

nancydru’s picture

Title: url length needs increased. » URL length needs to be increased
StatusFileSize
new2.23 KB

Here's 6.x.

nancydru’s picture

Status: Active » Needs review
nancydru’s picture

Assigned: Unassigned » nancydru
Status: Needs review » Fixed

Fix committed to both 6.x and 5.2 branches. Need to roll a new release.

@mdlueck: do you know how to check out a version from CVS? I'd like you to test if before rolling a release.

mdlueck’s picture

@NancyDru: No ideas where to begin looking for the CVS. However, I do have a Linux desktop these days, so think Linux has me better prepared to do so.

nancydru’s picture

StatusFileSize
new22.18 KB

Here's a zipped version of the 5.2 version of the module.

mdlueck’s picture

I tried the module attached to #6 on a clean / test install of Drupal. I enabled the module and ended up with a red error box:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY url (url(2048)) ) /*!40100 DEFAULT CHARACTER SET utf8 */' at line 9 query: CREATE TABLE weblinks ( nid int(9) NOT NULL default '0', tid int(11) NOT NULL default '0', vid int(11) NOT NULL default '0', weight smallint(6) NOT NULL default '0', url text NOT NULL default '', KEY tid (tid,vid), KEY nid (nid) KEY url (url(2048)) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /homepages/35/d157794216/htdocs/sites/d1.domain.org/www/includes/database.mysqli.inc on line 154.

Obviously in no rush, so I will not proceed further.

nancydru’s picture

In the create statement at the top of the module, I guess I missed a comma.

        KEY tid (tid,vid),
        KEY nid (nid)
        KEY url (url(2048))

should be:

        KEY tid (tid,vid),
        KEY nid (nid),
        KEY url (url(2048))
mdlueck’s picture

Got it successfully installed with that in place. Tried to create a long URL and I got this red error box:

URL cannot be longer than 255 characters but is currently 867 characters long.

Seems a length limit bit of logic is still in place.

nancydru’s picture

Ahh, I'm being very blonde the last few days. That's on line 104 (6.x) or 488 (5.x); just remove the 'maxlength' line. Sorry about that.

mdlueck’s picture

I found the offending entry on 480 of the 5.x module. 488 was for the weight field. Zapping 480 indeed put this right. Please make sure you indeed zapped the correct line on your side.

mdlueck’s picture

All right, I just checked out all of the functionality I am aware of in the 5.x version. With the above mentioned tweaks, looks like an excellent build to me.

Disable / uninstall / enable again works and everything seems to come back properly.
Long URL's work properly.
Can not find stray HTML tags that show up in the web browser.
When editing an existing weblink, link categories are properly selected, remain selected.

Looks like an excellent build to me.

To migrate to this build when it releases, I think I will uninstall my custom fork, and re-create links on my sites. It will not take me very long at this point. Better safe than sorry I think.

Thank you so much! :-)

nancydru’s picture

Great! Robert is unavailable for a day or two, so I'd like to wait to create a new release.

nancydru’s picture

Status: Fixed » Closed (fixed)
mdlueck’s picture

#13 + #14 = Is this included in 5.x-1.15 then? I did not see this mentioned here:
http://drupal.org/node/282749

Please let me know and I will test the finished results at some point. Thanks! :-)

nancydru’s picture

Actually, I think that was in -.14. But whichever it was, yes the change is there just the way you wanted it.

mdlueck’s picture

Thanks, I will pull down the new build and check it out then! :-)