Hello and thank you for the great module!
I have a custom content type called say... "Student".
This type holds persons details like name, contacts, personal homepage and... you guessed it! a personal blog RSS feed link.
Meaning that, I would like to automatically import his/her blog posts into Drupal site.
So... instead of having these RSS links in the (default) Feed type - I have the links in my custom content type.
How do I make it so that Cron actually loops through my Students, looks for the Blog RSS field value and aggregates (pulls and saves) the data from there into Feed item?.
Any ideas or tips?
Should I use PHP and Feeds API-s for that?
Thanks,
Comments
Comment #1
mareks CreditAttribution: mareks commentedHold your horses ;)
I think, all I really needed to do was to change the "Attached to" settings from "Feeds" to "Student" under the "Feeds importers".
/admin/structure/feeds/feed/settings
This created me a field called "FEED" (Enter a feed URL.) for my custom content type.
So far so good,
Comment #2
mareks CreditAttribution: mareks commentedIt works!
However, the new RSS link field that was automatically created for my Student Content-type is marked as mandatory - thus... I can't save the node with an empty RSS URL field. I get an error "URL field is required".
But some students do not have a blog.
There seems to be no settings for this field?
What are my options?
form_alter ?
Thanks,
Comment #3
TechNikh CreditAttribution: TechNikh commentedI fixed my issue with form alter
Comment #4
TechNikh CreditAttribution: TechNikh commentedlooks like even validate function should be disabled. otherwise it throws below error.
The URL is invalid.
Comment #5
TechNikh CreditAttribution: TechNikh commentedI had to add this to below validate function
if(!empty($values['source'])){
feeds\plugins\FeedsHTTPFetcher.inc
Comment #6
Dianna L CreditAttribution: Dianna L commentedWow- Thanks so much for this!
Searched and searched and this finally fixed the problem for me on Drupal 6.
Comment #7
falster CreditAttribution: falster commentedThis is a really nice solution. But is there a good way to add the
if(!empty($values['source'])){
without going directly into FeedsHTTPFetcher.inc ? I don't feel like it is a good idea to hack feeds.Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedCan this solution be ported to D7? I have the feed-URL-field in the Drupal Blogs content type. I tried:
but after I add the
if(!empty($values['source'])){
to the FeedsHTTPFetcher.inc I get WSOD when adding blog content.Comment #9
MegaChriz CreditAttribution: MegaChriz commentedThere is also an other issue about making the Feeds fetcher form optional for when attaching the importer to a content type: #856316: Add option to make source URL/file not required for importers attached to nodes, so I close this one as a duplicate.