Hi,
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.
Thanks
Comments
Comment #1
ergow commentedComment #2
donSchoe commentedI'm getting the same issue.I created an importer and I want to import from an URL like that:
http://my_dev.example.org/gdata/?auth=AsdF1234&project=myproject&sheet=mysheetTrying 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 inplugins/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 thevalid_urlmethod is failing here?Update: I'm using an underscore which is not allowed in subdomains. Annoying, but nevermind.
Comment #3
Bensbury commentedI 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
Cheers.
Comment #4
twistor commented@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.