Link validation on submit from node creation/edit always fails with "missing schema." It does so because an _empty_ variable $url is being checked.
Solution:
weblinks/contribs/weblinks_checker/weblinks_checker.module line 183 should be changed
from:
$response = drupal_http_request($url, array(), 'HEAD', NULL, 0);
to:
$response = drupal_http_request($new, array(), 'HEAD', NULL, 0);
Notes:
1. $new should be safe. It is set/checked on 159-162:
$new = _weblinks_checker_fix_url($form_state['values']['url']);
if (!valid_url($new, TRUE)) {
form_set_error('url', t('"@url" does not look like a valid URL.', array('@url' => $new)));
}
2. This error probably originated from failing to change this occurrence of $url to $new after copy-pasting (now) line 332 from the cron job.
Comments
Comment #1
md96 commentedThis worked. Thanks!
Comment #2
aa461 commentedI had the same problem. Your solution worked.
Thank you very much.
Comment #3
loriguidos commentedSounds like this might work to fix Weblinks, but I am too much of a newbie to make these changes myself.
Maybe the person who owns and maintains the module will modify and then let all of us know once this has been fixed?
I guess I could go spend 15 minutes to see if this has been fixed, but I am short on time today.
Here's the secondary Drupal issue which perhaps can be resolved by Drupal 12.
--
Here I am back to Drupal and checking the my mail and seeing that I reported this problem about 5 months
and it has a potential solution. I was linked here from a suggested solution at my original posting.
I wish we had some type of referring issues links where a taxonomy or database -- maybe Hadoop? could give us a list of other links to an issue. This way maybe I could find that the module owner has already seen this and has fixed it or has added it as an item to be fixed at a later date.
Probably not good for me to add this to another post, but this is one of the reasons why I find it difficult
to use drupal...
Yes I know everyone is volunteering
-- and doing a great job -- I might add...
It's just more of a technological process issue that needs a programmer to look at and see if we can streamline the process.
Best,
Lori
Comment #4
GStegemann commentedWas fixed in issue #589192: After upgrade cannot create or edit links: get an error code of -1002 (missing schema).. Set issue to fixed.