Troubles with web feeds / rss in new FarCry 7.2.9 install

Hello, on our FarCry 6 site we’ve been using a web feed to collect news items for a long time, without issue. I am trying to set up a similar feature for our new 7.2.9 site and am having lots of problems.

Everything seemed to deploy okay in COAPI admin, and a new “Custom Content” tab appeared in the web top after that. Through there, I created a new webbed content item using the same settings as on the old site. I did not get any problems, but when I previewed it, I got a dump of the settings of the content item itself (title, subtitle, description, image, etc) rather than the page.

So I figured I should schedule a task, and that everything would be good after the initial run of the task. The task seemed to run okay, and I got a message page with links for “Created RSS feed” and “Created Atom feed.” But when I click either of those links, I get an error:

XML Parsing Error: no root element found
Location: https://mysite.com/feeds/Latest-AHS-News/rss.xml
Line Number 1, Column 1:

Does anybody have any clues? Or, can you suggest a different way of doing things? We have a few users that use the RSS feeds on their projects, and I would really like to get it working for them again. Many thanks in advance!

Can you provide the real URL to the RSS feed or a copy of its contents / at
least the first several lines?

The error is saying that there is no “root node” in the XML file which
generally means that the XML is not well-formed, but we’d need to be able
to see the XML to help debug it further :slight_smile:

Thanks Justin, I don’t see any XML at all in the file! Here is all that is in feeds/Latest-AHS-News/rss.xml (sorry for the length):

indent preformatted text by 4 spaces

<script src="/cache/fc%2Djquery%2D72EC63B2CACA26B441DD784AD82C33DA.js" id="javascript-jquery" type="text/javascript"></script>
<script src="/cache/fcga%2D20D02CBAF37F8A699795DD0ACB62CDC7.js" id="javascript-fcga" type="text/javascript"></script>

<meta id="inhead-ga" property="inheadid" content="ga"><script type="text/javascript">
$j.ga.setTracker('UA-5066732-5', { downloadClasses:['dmFile'] });
$j.ga.setCustomVar(4,"typename","farWebfeed",3);
$j.ga.setCustomVar(5,"objectid","1591AA00-0786-11E8-B648005056BF91B4",3);
$j.ga.trackURL('\x2Ffarwebfeed\x2Flatest\x2Dahs\x2Dnews\x2F');
		
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
You have been denied access to this item 

I am no expert but that does not look like XML to me! :grinning: So I have probably done something wrong and it is preventing the “real” xml file from getting created, maybe? I sure can’t figure out what though.

Thank you very much for your help! I appreciate it!

I forgot to mention that I pasted in the contents of the xml file from our old site, and updated some of the items to match. I restarted everything but still got the exact same error. And then a few minutes later, the contents were overwritten by what I pasted in above. I don’t know what Google Analytics has to do with anything, but that is what is being automatically written in the file. Don’t know if that helps!

It looks like the item might be in draft:

You have been denied access to this item

If you approve it, does that fix the problem?

Thanks Justin! Apparently something is hosed with this particular installation – I tried it on another site we are using that runs Chelsea Boots and it worked fine. I also tried it on a clean install with no other data and it worked fine. So the problem exists (naturally) only on our main production site! :sweat_smile:

That being said, I pulled out all the existing content and went to scaffold the webfeed type admin interface from COAPI and got

The cause of this exception was: java.io.FileNotFoundException: 
C:\home\mysite.com\wwwroot\farcry\projects\newsite\customadmin\farWebfeed.xml (The system cannot find the path specified).

So something appears wrong with this particular installation. I will keep working on it. Thanks for your help, Justin, I appreciate it!

Starting from a clean slate got me to where a blank page with the default webskin will at least load. Doing a “&view=feedRSS” at the end will show me the raw XML of our news items, but only if I am also logged in to the web top.

If I hit that page in another browser, not logged in, I get a rather curt “You have been denied access to this item” message, with nothing else on the page. None of the default skin or anything else loads, and it does not say why I am denied access. Logging in to the web top and then refreshing that same page will reload the XML, though, so it is evidently related to permissions somewhere down the line.

Any ideas on how I can make this page viewable outside the web top? I see where I can set permissions on the content type for “anonymous,” but that only seems to allow choices for approve, create, edit, delete and so on. I don’t see one for just “view” or whatever.

Any clues? I sure would appreciate any tips as to where in FarCry I can look. I feel I am almost there and would like to get this running for our users.

Thanks a lot, and have a great weekend everybody!

By default only display* webskins are accessible to public users. The
simplest solution is to rename the webskin to displayFeedRSS. You can also
add webskins to the anonymous role in the Webskins tab.

Blair

Thanks a lot Blair – although I did not want to make any edits in core, changing “feedRSS” to “displayFeedRSS” did indeed show the RSS webskin, even if not signed in. Many thanks!

However, the individual items themselves did not show, and I got a “you have been denied access to this item” message 15 times haha. I tried renaming core/webskins/types/feedRSS.cfm to displayFeedRSS but that gave me an error that the webskin displayFeedRSS was not found in dmNews. Manually creating a file by that name in dmNews gave me a different error.

I did a crude workaround in core/webskin/farwebfeed/displayFeedRSS. Instead of running
<skin:view objectid="#qObjects.objectid[currentrow]#" webskin=“feedRSS” stParam="#stObjParam#" />, I just queried dmNews for the stuff I needed to build my own RSS file.

It works okay, I suppose, but I sure would appreciate any info you might be able to provide on how to fix this properly! This band-aid edits in core is what got me into trouble in the first place! :grinning:

Haha, sorry, I didn’t realize these were core webskins. In that case
updating the role would probably be simpler.

To be honest - we usually write a custom RSS webskin when we need that
functionality. The CFFeed tag makes it very easy to do, and it is clear to
other devs what filters are being applied to the output (e.g. date, status,
category, etc).

Thanks Blair, I appreciate the follow-up. I will likely end up doing just that, in order to fix the workaround I set up a little while ago and return core to its original state. I was just trying to take advantage of functionality built in to FarCry CMS.

Thanks for your help though, and thanks to Justin also!

In case anybody else has a similar issue, updating my core to the latest from GitHub resolved it for me! Core is now back to its original pristine state.Thanks for the tip, Justin!