hi, I have three sites, and I want to share some content between them with FeedAPI. I want to use this to share a long database of members of an organization (not users). I have sites A, B and X. X will contain nodes from A and B, but A will not contain nodes from B nor X.

I built a view to show some content on sites A and B and with RSS and FeedAPI I want to publish those nodes on site X. The problem is that views is showing the cck fields, but grouped on 'description' and this way I can't map the fields on site X.

How can I create an RSS feed on sites A and B showing all node fields and then map those fields with FeedAPI on site X? note: the fields from sites A, B and X are the same.

the following is an example of the feed item, as you can see, I can't map any cck fields

Array
(
    [title] => John Smith
    [description] => JohnSmith
    [options] => Array
        (
            [original_author] => Members Feed
            [timestamp] => 1233097605
            [original_url] => http://www.mydomain.com/node/2
            [guid] => 2 at http://www.mydomain.com/
            [tags] => 
            [domains] => 
            [raw] => Array
                (
                    [title] => John Smith
                    [link] => http://www.mydomain.com/node/1
                    [description] => JohnSmith
                    [pubDate] => Tue, 27 Jan 2009 17:06:33 -0600
                    [guid] => 1 at http://server/websites/comunik2
                )

        )

)

John Smith is the Node title and I have two fields: First Name: John & Last Name: Smith; both are grouped on [description].

Thanks in advance

Luis

Comments

lelizondo’s picture

anyone? I just wanna know how to map cck fields with a RSS source build with views.

Luis

Luis

justageek’s picture

http://www.drupaltherapy.com/node/34

I had a hard time getting this to work right, but I didn't put a lot of time into it.

If by chance you have access to all the databases, i.e. they are on same server or same host, you might share this data with a module that pulls from one and creates nodes in the others. That might be too much work, not sure.

lelizondo’s picture

Thanks for the reply

I left a comment at drupaltherapy.com on Feb 5th but still no answer from Sean. That's a great screencast, and I don't have a problem mapping content
from third-party providers like Youtube, the problem, and I can't believe this, is that I haven't found a way to map content that's being generated by another Drupal site. I think this should be easy, but apparently, it isn't.

For some reason, Views won't generate a RSS that could be used to map content on other Drupal site.

Edit: this won't even work on Drupal 6, and Views 2 is some much powerful than Views 1.

Luis

Luis

justageek’s picture

mapping content from an rss feed to nodes should be independent of the rss source. if drupal site A produces an rss feed, then the mapping is handled at B and should not matter that the rss comes from a Drupal site or from CNN, Yahoo, etc. So, if you are having problems getting an rss feed from views, that is a completely separate issue from mapping a feed into nodes using feedapi.

What problems are you having getting rss from Views 2?

Again, it is tricky at best and I had a hard time as well, I did finally get it to work but I don't remember how.

This is based on Drupal 5 but might help

http://mydrupalblog.lhmdesign.com/topic/feedapi

lelizondo’s picture

you're right, this has nothing to do with feedapi, this is about creating a feed with views that could be mapped with feedapi...

the problem is how to build a view, using cck fields, that produces a "valid" rss source, that I could use to map cck fields.

Building a view with nothing but the node title, two cck fields, and the RSS Feed selector argument will produce an rss feed that shows the cck fields grouped like this:

[title] => John Smith
[description] => JohnSmith

To be able to map the feed, I'd expect to have something like this:


[title] => John Smith
[first_name] => John
[last_name] => Smith

I used Views 1 and 2, neither shows the rss feed as I need.

Luis

Luis

lelizondo’s picture

After hours searching drupal.org I found the following posts:

http://drupal.org/node/87430

#300790: Generate XML Feed / RSS Feed with "nested" elements.
#341240: extra data necessary for extra_RSS_fields
#316107: CCK Fields as elements in Views with XML Data Document

http://www.pronovix.com/blog/presenting-extra-rss-fields-module-outputs-...

I also found the following modules:

http://drupal.org/project/views_datasource
http://drupal.org/project/nodeshare
http://drupal.org/project/extra_RSS_fields

The conclusions are:

87430.
Didn't work, seems easy, just adding every cck field to a module and force views to display them. Good idea but didn't work for me. Maybe I did something wrong.

300790
This solution uses contemplate to display the fields on the rss. The fields display but I just couldn't generate the xml the right way. Again, maybe I'm missing something here.

341240 (extra_rss_fields)
This one is a tiny patch to make extra_RSS_fields work. I tried everything option with this module but the RSS showed nothing, not even the node title. I'm pretty sure I did something wrong here but I couldn't figure it out. I added the option to show all fields but RSS showed nothing. When I edited the view it showed me several times an error at line 70-71.

316107
All my hope is in this issue. Many issues related to this problem links to this issue. In comment #1 merlinofchaos said: "Kristof made a patch for View for Drupal 5 that does this". But it doesn't say where's the patch. Hopefully, merlinofchaos will respond to the post and tell us where is the patch Kristof made.

Viewsdatasource
Some other posts mentioned this module so I decided to give it a try. all I got was an horrible error when trying to access the feed. Maybe the solution is somewhere in the issues but I didn't want to spend time searching. If 316107 or nodeshare don't work, I'll come back to this module.

Nodeshare
Somehow I found this module that seems to do exactly what I want, publish nodes on different and independent drupal sites. Seems a little scary to configure but I'll give it a try.

Hope this helps somebody else.

Luis

justageek’s picture

So are you saying that if I have a custom content type with specific cck fields, that the resulting rss from an RSS type view is not valid? You installed the necessary add-on for view , I think it is a row-style plugin to make rss feeds automatically from a view?

It seems views gives you all the control you need to group accordingly and create a valid rss feed, from what I can tell from my install.

lelizondo’s picture

Maybe using the word 'valid' was not the right word to use. What I mean is that all cck fields are grouped like this:

[description] => JohnSmith

Instead of something like this:

[first_name] => John
[last_name] => Smith

This way I could map the fields properly. If they are grouped in description I just can't.

So in a way, for what I'm trying to do, the RSS built with views it's useless.

Luis

justageek’s picture

If you create 2 new fields called first_name and last_name then those fields should be available as individual data fields. If you are putting your name in the description field, then that's all views is going to give you back.

lelizondo’s picture

I have two fields called first_name and last_name, there's no description field and the body has been disabled. Views groups them no matter what I do.

Luis

theunraveler’s picture

Any progress made on this?

lelizondo’s picture

no, not really

Luis

PMatwyuk’s picture

Just so I can confirm, are you able to create a view on site x which is generated by the content/views of site a and b??

I'm trying to do this for a site that has an i google type feel.

lelizondo’s picture

Creating a view on site x it's not a problem, the problem is how views shows cck fields on site a/b when creating a feed view. Since they're grouped I can't use feed api to map the fields.

I'm moving my site to Drupal 6.x as I write maybe Views 2 will do a better job. Nodeshare was so hard to configure.

Luis

zarrarnyc’s picture

I think the Feeds module might do this.