Jump to content
ryan

RSS Feed Module

Recommended Posts

Chrome inspector gives me a 404 error for the xsl: 

Failed to load resource: the server responded with a status of 404 (Page Not Found)

perhaps comment out that line in the .module file and see if it fixes the issue.

I downloaded your xml file, removed

48 minutes ago, Peter Falkenberg Brown said:

<?xml-stylesheet type='text/xsl' href='/site/templates/styles/rss_feed.xsl' ?>

and loaded it in Chrome - everything is viewable normally.

 

Share this post


Link to post
Share on other sites

Hi Dragan,

Yep, that worked.

This is the line that I had to comment out:

/*		if($this->xsl) $out .= "<?xml-stylesheet type='text/xsl' href='{$this->xsl}' ?>\n"; */

This would be a good thing to fix in the module, I do believe.

This is one of Ryan's core modules, I think.

Thanks!

Peter

 

Share this post


Link to post
Share on other sites

@Peter Falkenberg Brown are you sure you don't have it improperly configured? The only way to get the module to output the XSL stylesheet would be if you set that in the module config. You shouldn't have to comment out any code.

this is the config setting:

https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupRSS.module#L258

this line means it would only output XSL if you entered the path to that stylesheet in your settings:

https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupRSS.module#L90

  • Like 1

Share this post


Link to post
Share on other sites

Hi Macrura,

You are exactly right.

I don't remember placing this line in the module backend data field "Default Link to XSL Stylesheet"

"/site/templates/styles/rss_feed.xsl"

but it was there.

So, I removed it, and then uncommented the line in the module, and all was well.

I suppose I could have placed that value in the data field: I just don't remember doing so, and never had that file on my system.

Oh well... mystery solved, and the module has no error.

It was human error! Oy. Ugh. :-)

Thank you VERY much for clarifying this.

Peter

 

Share this post


Link to post
Share on other sites

Hello all,

I need help adding the <content:encoded> tag containing body field content into the feed output. 

Reason being is that I have been tasked with importing blog posts from one of our sites into a new system and it will not work without the appropriate content tags.

I am not a php developer so excuse my ignorance. Any help that you can provide would be greatly appreciated.

 

Share this post


Link to post
Share on other sites

Hi there -

is there a way to include the first image and the body of a page to the "itemDescriptionField" without leaving $rss->render($items); ?

In my case this happend automatically for the frontend output, so I'm searching for a way to integrate the images in my feed.

Thanks in advance.

Thorsten

Share this post


Link to post
Share on other sites

I realize this is an old module, and RSS is hardly new sexy stuff, but RSS feeds are a great "glue" between products. Im trying to get an RSS feed out of a PW site and did the following steps:

  • Turned on the Module from Core.
  • Left all module options default. 
  • Copied example code into a new file called rss.php in my /site/templates directory.
    • changed items to get a page by ID:
      $items = $pages->get(111)->children();
  • In ProcessWire, went to add a new template, selected the rss file. Left the template blank with no fields. 
  • Created a new page with RSS template. Viewed page and got no output—visibly blank, and view source is an empty line.

I'm probably tripping over my own shoelaces here, but thanks for any advice. 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, adickman said:

I'm probably tripping over my own shoelaces here, but thanks for any advice. 

This is when you gotta do some debugging. Some things to try...

  • Set $config->debug to true to make sure you are seeing error messages.
  • Install Tracy Debugger - the debug bar is great at catching error/warning messages that debug mode sometimes misses.
  • Dump $items with Tracy Debugger to see if there's actually any pages in there: bd($items);
  • Not sure if the line of code you showed is just a demo or your real code, but 111 is not going to be the ID of a front-end page because these start at 1000.

Welcome to the forums BTW 🙂

Share this post


Link to post
Share on other sites

I can’t list my selected page, just like @adickman. I suspect it is related to the page or field permissions because 1. I can see other templates (basic-page for instance), 2. if I comment the viewable condition in the MarkupRSS module, I can see my feed correctly.

I also tried to check the “Make field value accessible from API even if not viewable (see below)*” box on my template page but it does not work.

What else can cause a page’s template to be inaccessible from the API?

Share this post


Link to post
Share on other sites

I can’t figure what is happening: I can echo the page I select using find("template=…") but when I pass it to render() nothing is listed. Everything works fine with the basic-page template however.

$items = $pages->find("template=basic-page"); // working
$items = $pages->find("template=ressource"); // not working with my custom template

$rss->render($items);

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...