Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jul 2010 at 14:25 UTC
Updated:
26 Nov 2025 at 14:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alex_b commentedGood feature request. Applies to HEAD.
Comment #2
alex_b commentedThis is a novice task.
Comment #3
buddaIs this simply a case of removing the form #required or are there other implications of having "feed" nodes with no feed URL set?
Comment #4
buddaPatch attached to remove required setting just to get the issue cleared.
Comment #5
alex_b commentedThis should be optionally required.
Comment #6
buddaAn option to make another field optional. Is that going to far with the options a site builder has?
Comment #7
buddaHere's a more flexible configuration option patch.
Comment #8
patcon commentedSame feature could be useful for file uploads too (not just feed URLs).
Comment #9
alex_b commentedSorry for coming around late:
'feed_required' should be 'url_required'.
#8: you are right, we should cover both fetchers.
Comment #10
patcon commentedSorry alex, so given that both fetchers should be covered, isn't "feed_required" the best config name? (If I extend this?)
Comment #11
patcon commentedRight now, it's looking like I need to set a "feed_required" setting for each fetcher, but I'm wondering whether I can set set this on the Basic settings page in such a way that any fetcher (even if a new one is introduced) will inherit this "required" property?
Still new to this though. Bad idea? Not how it works?
Comment #12
alex_b commented#10
Good point, let's use "source_required" then.
Comment #13
patcon commentedComment #14
Bevan commentedThis patch implements a configuration option for both the File and HTTP fetchers to make the field optional. It also hides the "Import" tab on nodes if there is not a valid source. There are some minor issues;
theme_feeds_upload().FeedsSourceactually has a valid source or not infeeds_access()andfeeds_nodeapi(). It seems clunky, and there is probably a better way?;The patch needs more work, but it also needs some review to maintain good direction.
This does not really seem like a novice issue any more.
Comment #15
Holoduke commentedI need this feature.
I checked patch from budda, looks nice, var name will be changed easy to source_required.
But i didn't saw applied to form exposed:
I just tested at my site and it works fine. Ofcourse, the patch is old and i doesn't fit current beta version, but the concept works fine. I changed by hand. I don't know how to post a complete patch, but if anybody has a CSV configured, the patch will be done within minutes.
Comment #16
Bevan commentedhttp://drupal.org/patch http://drupal.org/documentation/cvs
Comment #17
EmanueleQuinto commentedThe attached patch simply reproduce settings from FeedAPI options (#590064: Optional feeds) and works only for file fetcher.
Should be straightforward to extend to HTTP as well but I can't test that fetcher.
Comment #18
sbydrupal commentedWill there be any update on this issue moving forward ?
Patches in #7 and #15 works in the sense that the page can be submitted without requiring feed url (I use a single content type to
capture the feed in). However, during node submission, it still runs the import process and provide warning that feed coulnd't be retrieved...
Will the upcoming update include the changes ?
Thx much
Comment #19
Arts and Ideas commentedSure could use this update, too!
Need to import AND locally create nodes.
Thanks.
Comment #20
Bevan commentedLets try to get some attention from the maintainers.
Comment #21
dfgcvb commentedSubscribe.
Comment #22
farhadhf commentedSubscribe!
Comment #23
mareks commentedUsing latest D7 dev and I too think that the URL field should be optional.
For example, I connected the feeds with my existing content type called Student - in order to pull in their personal blog info. But not all students have a blog :)
I feel like a fool. This is so obvious case. I must be doing something wrong? Maybe the mappers are somehow behind this?
Comment #24
kscheirerRan into the same problem, this patch would still be useful in 2014...
I'm using Feeds 7.x-2.0-alpha8 and https://drupal.org/project/feeds_selfnode_processor, and not all my nodes have a feed from which to update. Not sure which patch to port to D7.
Comment #25
kscheirerThis worked for me, patch written for version 7.x-2.0-alpha8.
It's a reroll of Bevan's patch in #14, which looked most complete to me. Luckily most of the code is still the same. Sorry for the p5 format, I'm sure that will make the tests fail :(
Comment #27
kscheirerSorry, here's a properly formatted patch.
Comment #29
kscheirerAll these errors look like problems in the tests themselves, can someone confirm? Patch is working great for me.
Comment #30
subu.purohit commented#4 did a quick fix for me and required tag was removed from node form. But when I submit node then it returned me error "The url is invalid".
So I added a condition in sourceFormValidate() function as:
if ($values['source'] != null) {and now it is skipping validation for url field.
Comment #31
xiahy commented27: 856316-optional-source-url-27.patch queued for re-testing.
Comment #34
kscheirerRe #27, still looks like unrelated test cases are failing. I'm happy to fix up the patch if there's really something wrong of course.
Patch has been in my production for almost 2 months and is still working great for me.
Comment #35
ufku commentedUpdated the patch. It now also removes/skips scheduling when there is no source. This saves lots of execution time during cron.
Comment #36
Rob_Feature commentedOn the latest dev we get
Comment #37
twistor commentedWhy are we not scheduling the feed on insert?
Comment #38
ufku commentedfeeds_node_insert() calls feeds_node_update() which schedules the import if a source is provided.
Comment #39
senzaesclusiva commentedSorry to reopen this.
I wish to ask if this option is already included in dev version
Thanks
Comment #40
kscheirer@senzaesclusiva - no worries, the issue was never closed, so you're not re-opening. This code is not yet in the dev version, you'll need to apply one of the patches in this issue.
Comment #41
senzaesclusiva commentedMany thanks Kscheirer
i'll try to apply one of them.
Comment #42
senzaesclusiva commentedHello Kscheirer
I tried to apply a patch (feeds 7.x-2.0-alpha8 ) but it seems something goes wrong.
Here is a terminal report:
Wich could be the issue?
Thanks a lot
Comment #43
kscheirerWhich patch did you apply? If it's the one from #35, it should be applied to 7.x-2.x-dev, not the alpha.
Comment #44
senzaesclusiva commenteddamn.....I used the wrong version :-))
Sorry
Comment #45
senzaesclusiva commentedWell
i patched now the dev version and it seems to works fine; importers attached to the node has
URL/file field not required. Good!
But there is an issue referred to FeedsHTTPFetcher.inc. (look rej file attached).
It remain to be seen why Feeds Image Grabber doesn't work, as i posted few days ago.
https://www.drupal.org/node/2380661
Comment #48
reszlihere is the modified patch, that applies to latest dev
and the field can now be set to optional :)
thanks!
Comment #49
megachrizSetting to "Needs review" so the testbot will test the patch in #48.
Comment #53
paulsheldrake commentedUpdating the patch from #48 to apply cleanly.
Comment #54
paulsheldrake commentedComment #55
paulsheldrake commentedUpdating status to trigger testing
Comment #60
megachrizMarked #1369588: feed source (url) from different content-type? as a duplicate.
Comment #61
mr.york commentedReroll.
Comment #63
mr.york commentedFixed scheduler problem.
Comment #64
mr.york commentedComment #66
megachrizI tested the patch from #63 in action with the HTTP Fetcher. Codewise it looks good so far, though I have less knowlegde about the scheduling stuff.
With the importer attached to a content type and "Require feed" option turned off for the HTTP Fetcher, I noticed the following:
Shouldn't that say something like "The title or the URL is required"? This issue is perhaps related to #1621602: Could not retrieve title from feed - Make title field only optional if the parser can deliver a title.
FeedsSource::scheduleImport()no import job is scheduled if there is no source. So maybe this is fine.Other:
@todoin the code.Perhaps there are more useful cases to test.
Good work so far!
Comment #67
dshields commentedThe patch in #63 only helps with existing nodes.
It fails when creating a new node.
Comment #68
dshields commentedThis extends #63 to allow for the file source to be optional while creating new nodes as well as editing existing nodes.
Comment #69
dshields commentedComment #70
megachrizTests are passing. Back to "Needs work" as per #66.
Comment #71
geoffreyr commentedReroll of patch against most recent 7.x-2.x-dev.
Comment #73
dhigby commentedI want the ability to optionally specify a newsfeed for a node, so that I can aggregate feeds from all nodes into a large newsfeed. Since this capability is not yet available, it seems to me that I am using the wrong tool for the job. What solutions have others ended up with?
Comment #74
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.