I don't know why I get following error when i try to introduce a valid feed URL:

The URL feed:https://osha.europa.eu/search_rss?Subject=msd&RSSTitle=EU-OSHA%20Trastornos%20musculoesqueléticos&Language=es&review_state=published&sort_on=effective is invalid.

I need any help.



ergow’s picture

Assigned: ergow » Unassigned
Priority: Major » Normal
donSchoe’s picture

Title: invalid URL when I introduce to feeds importer » Feeds importer fails to validate URL
Component: Feeds Import » Code
Issue summary: View changes

I'm getting the same issue.

I created an importer and I want to import from an URL like that:


Trying to import that feed I get:

The URL http://my_dev.example.org/gdata/?auth=AsdF1234&project=myproject&sheet=mysheet is invalid.

I've checked the feeds module code and found there has to be an issue with the feeds_validate_url() function (feeds.module, lines 1084-1106) which gets called in plugins/FeedsHTTPFetcher.inc, line 152.

After disabling the url validation check (lines 152-156) i was able to import the feed without any issue.

Any idea why the valid_url method is failing here?

Update: I'm using an underscore which is not allowed in subdomains. Annoying, but nevermind.

Bensbury’s picture

I have a related issue.

In my use case the Feeds url is attached to a content type, and is essentially an option for a member to feed in their own news.
We hijacked the form to allow this value not to be required, and allow people to not have to have feeds as part of their profile.

That was working fine until the URL validation.
In our case it needs to accept blank, and if not blank run the validation.

So we have to hack it.
Problem is with the URL validation we don't expect Feeds to expect to ever allow a blank entry, and so every upgrade we will need to hack again.
In some modules URL validation is a checkbox option.
How about that? Because there are cases where people use strange urls and they fail. If that happens an easy checkbox to remove validation keeps everyone happy.
Like in the Link Field


twistor’s picture

Category: Bug report » Support request
Status: Active » Fixed

@Bensbury, what you want to do is create a custom fetcher.

You'll have to override HttpFetcher::sourceForm(), HttpFetcher::sourceFormValidate(), and probably HttpFetcher::fetch() to make sure that it doesn't try to fetch an empty url.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.