Hi,
Excuse-me I'm French and I don't speak english very well...
I Would like to use this plugin, but I have 2 problem to use it...

The first :
The Feed Icon disapear... But I saw this at the beginning of my test...
I see in the source code that :

      <div class="feed-icon">
      <a href="/drupal6-testcck3/flux_offre_emploi"></a>    </div>

But I see nothing on this views...

The second :
How could I configure the link fied ?
I have tested to add :
Node : Link as field and I put it on "Field Usage" in parameter.
But in XML File I have this in item :

<link><a href="/node/2">voir</a></link>

Also I must have :

<link>http://localhost/node/2</link>

I don't know how I could get the node url ?

Thanks by advance.
Bye

CommentFileSizeAuthor
#12 views_plugin_style_rss_fields.inc_.patch1.89 KBseanr

Comments

pydubreucq’s picture

Excuse me, for the feed icon this is the source code :

<div class="feed-icon">
      <a href="/drupal6-testcck3/flux_offre_emploi"></a>    </div>
chungyc’s picture

Related to the missing feed icon problem, is there any reason why the attach_to function in views_plugin_style_rss_fields.inc should not be identical to that in views_plugin_style_rss.inc from the Views module? I didn't see any reason it shouldn't be, so I copied it over. It seems to be working fine so far, but I'm worried that there is some huge breakage lurking on my site.

chungyc’s picture

If you want to add a link, then there is a workaround of rewriting a Node Nid field: rewrite the output like http://localhost/node/[nid]

Not quite the proper link I might want, but it should work.

rsoden’s picture

Title: How can I put the url link ? » Feed Icon
Assigned: Unassigned » rsoden
Category: support » bug

pydubreucq - have you tried using the global custom text field provided by views? you should be able to construct your link using the replacement patterns made available to you there. longer term, we need some better handling for common elements of RSS feeds like link and guid, related to this issue: http://drupal.org/node/589904

chungyc - there's no reason i can think of that your solution to the missing feed icon wouldn't work. i'll do some testing and make this fix when i can. changing the title and category of this case to reflect this.

sahuni’s picture

Hi,
I too cannot get the feed icon on my display page. However, I selected that display attachment when configuring my feed display.
It's working if I use style feed RSS instead of RSS Feed - Fields.
When you test, you have the attachment icon?

sahuni’s picture

I add by myself the feed icon in footer of the view as :
<a href ="myfeedname" > <img src="/misc/feed.png" width=16></a>
and it's working.
Still, I'd like to know why attachment is not working

chungyc’s picture

The attach_to function doesn't quite work, but using the same code from the Views module seems to fix it. At least I haven't had a problem with it so far. It has the additional benefit that it can tell web browsers and online aggregators that an RSS feed is associated with a web page, compared to just embedding a feed icon in the footer.

beasley’s picture

I've got a similar problem. If I set the style to be 'RSS feed' I get an RSS icon in the address bar of Firefox. If I choose 'RSS feed -fields' and configure it the icon disappears in the content it's supposed to be attached to. And yet the feed is created fine. I can navigate to the xml file and see it. I tried putting the 'attach_to' function in but that threw an error.

I wasn't sure what 'the same code from the Views module' meant (#7) so tried throwing the whole views_plugin_style_rss.inc code from Views into the Views RSS equivalent. I still don't get an icon :o(

sahuni’s picture

Sorry but finally I let it down

albert volkman’s picture

What he meant was to use this code (from views/plugins/views_plugin_style_rss.inc):

  function attach_to($display_id, $path, $title) {
    $display = $this->view->display[$display_id]->handler;
    $url_options = array();
    $input = $this->view->get_exposed_input();
    if ($input) {
      $url_options['query'] = $input;
    }

    $url = url($this->view->get_url(NULL, $path), $url_options);
    if ($display->has_path()) {
      if (empty($this->preview)) {
        drupal_add_feed($url, $title);
      }
    }
    else {
      if (empty($this->view->feed_icon)) {
        $this->view->feed_icon = '';
      }

      $this->view->feed_icon .= theme('feed_icon', $url, $title);
      drupal_add_link(array(
        'rel' => 'alternate',
        'type' => 'application/rss+xml',
        'title' => $title,
        'href' => $url
      ));
    }
  }

To replace the same function (attach_to, should be around line #25) in the views_rss/views/views_plugin_style_rss_fields.inc file.

Does that make sense? I can verify that it works for me as well.

beasley’s picture

Thanks a lot for that! Yes, it makes sense and all is working now :o)

seanr’s picture

Component: User interface » Code
Status: Active » Needs review
StatusFileSize
new1.89 KB

Here is a patch that fixes this and also adds an option to display the feed icon in the attached links area instead of in $feed_icons in page.tpl.php.

gábor hojtsy’s picture

Title: Feed Icon » Feed icon disappears, feed not added to HTML
Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Ok, this is supposed to be the very basic functionality of this module, so if it does not even manage to call drupal_add_feed() at a single place, then we can consider this critical. I'm trying to use this to produce feeds for activity 2.x created views. It is working fine except I'm getting the empty feed image issue and no drupal_add_feed() call in the module results in no browser recognition of the feed on the page either. Let's get this in since multiple people confirmed it works.

jsenich’s picture

This patch works for me as well.

jolidog’s picture

Works for me too...

David Goode’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Assigned: rsoden » David Goode
Status: Reviewed & tested by the community » Fixed

I committed the one from the actual views RSS style plugin verbatim, IE without this new option. Why is that new option useful or necessary?

Thanks,
David

seanr’s picture

Status: Fixed » Active

David, the reason for my patch was that when you set it up as an attachment, it'd end up in $feed_icons, but in certain circumstances, you might not want that. In the case of data.ed.gov, if you go to the one of the two grant listing pages (either of the big buttons in the body of the homepage), you'll see a CSV button below the table listing all the applications. I wanted an RSS icon there too (since it makes sense to have the exportable format options in one place) but the current functionality won't allow that.

joachim’s picture

You basically need this line:
$this->view->feed_icon .= theme('feed_icon', $url, $title);

at the same place as the drupal_add_feed().

Though I'm not sure what the design decision is to not show the RSS icon in the body of the page; particularly as now browsers such as Firefox no longer show it in the address bar.

maciej.zgadzaj’s picture

Assigned: David Goode » Unassigned
Status: Active » Closed (fixed)

Remaining part of seanr's patch added to 6.x-1.x-dev.

maciej.zgadzaj’s picture

Issue summary: View changes

Added missing definition.