"That does not look like a valid URL."

madamski - September 15, 2009 - 15:55

What gives? I don't understand why I keep getting this message when trying to create a link.

Link name: Homepage (example)

URL: http://www.homepage.org (example)

Not sure why I'm getting an error message.

bump. Still looking into

madamski - September 16, 2009 - 15:51

bump. Still looking into this. Thank you for the assistance!

using tinymce?

pogonaV - September 16, 2009 - 16:10

Sorry, very newbish here, but

madamski - September 16, 2009 - 20:19

Sorry, very newbish here, but how would I know if I am using tinymce? The only extra module I've installed is IMAGE.

no problem

pogonaV - September 17, 2009 - 14:25

you won't be, then. tinymce is a module you'd download and install. (you can check what modules you have by going to home > administer > site building > modules).

the tinymce post was the only reference i've seen to your error - hopefully someone else can jump in here and help out.

Yeah, still looking for help

madamski - September 17, 2009 - 18:41

Yeah, still looking for help here then. Thanks!

deliberately hiding the problem?

dman - October 3, 2009 - 03:03

It's impossible to tell if you are not going to post the actual URL that has the problem!
It probably is invalid, due to structure or syntax. Hostnames can't have underscores or special characters, url paths have a very special set of character rules.
Did you just type something wrong?

.dan.

Experiencing the same issue.

m.sean.kelly - October 28, 2009 - 20:02

The URL is: http://www.adlnet.gov/Technologies/scorm/SCORMSDocuments/Previous Versions/SCORM 1.2/Documentation Suite (SCORM 1.2)/SCORM_1_2_pdf.zip.

The browser seems to think it's fine.

-=michael=-

There..

ludo1960 - October 28, 2009 - 20:10

..is a maximum length to a URL, not sure what it is though ......someone else will though!

What's odd...

m.sean.kelly - October 28, 2009 - 20:47

...is that it seems to be a problem when editing, or after previewing.

I looked into the max URL issue, and found that the URL was bumped to 255 in 2007: http://drupal.org/node/175508.

did you try without spaces?

dman - October 28, 2009 - 20:50

I can't see where you are getting that message from, maybe I've got a different version of the code, but the closest I can see is "Not a valid URL."

Anyway, it looks to me like function link_validate_url() is not allowing spaces in URLs. Probably because URLs are not supposed to have spaces in. RFC 1738
Browsers and other things may convert that common error to a correct request in the background, but really it should use either '+' or '%20' to represent a space in an URL. See, even the HTML-linker above couldn't deal with that not-URL.

.dan.

All is now good, bright, and beautiful in the world.

m.sean.kelly - October 28, 2009 - 21:19

The spaces were the thing. Thanks Dan. Much appreciated.

-=michael=-

Got it figured out.

m.sean.kelly - October 28, 2009 - 22:38

When pasting a URL with spaces into the URL textarea, the "%20"s are very nicely inserted. But when I attempt to edit a link with a URL that previously had the "%20"s, then they've reverted to spaces. The same thing happens when previewing.

It'd be a better user experience if the "%20"s persisted. I'm new to the whole Drupal thing. Should I submit this as an issue? If so, where do I go for that?

Thanks,

-=michael=-

could be

dman - October 29, 2009 - 02:05

Hm.
That certainly sounds like a UI bug.
We need to narrow down which module is responsible first. Is it (do you have) link.module? I couldn't see that exact quoted text in the code, so I'm not sure.
If so, see the issue #575344: Spaces in URL cause link_validate_url() to fail
If you can post this additional information you've found there, maybe someone will know what to do.

.dan.

Been usin'...

m.sean.kelly - October 29, 2009 - 05:05

...weblinks.module. Although, I'm starting to question the wisdom of making a link a first-class node. Seems like it'd be much simpler to just create a menu of links for the the left side-bar, or a page of links if I needed some descriptive text to go with them.

It's a choice.

dman - October 29, 2009 - 07:56

Weblinks as first-class nodes has a lot of benefit. Although it is a little more overhead to manage in the first place, it scales up better and can be extended well.
Depends on your use case. There is something to be said for just using a menu, or a hard-coded block for static stuff. Weblinks (or the equivalent with CCK) is the story for links directory.
See the appropriate issue queue.

.dan.

 
 

Drupal is a registered trademark of Dries Buytaert.