Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Darren, I have used your feed cache package on another project and it worked like a charm. I set it up on my current project and all working fine with the default feeds. When I connect it to a feed I need to cache:
I get the following:
Error loading IApplication: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: There is an error in XML document (6, 88). ---> System.Xml.XmlException: An error occurred while parsing EntityName. Line 6, position 88. at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseEntityName() at System.Xml.XmlTextReaderImpl.ParseEntityReference() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlReader.ReadString() at System.Xml.XmlReader.ReadElementString() at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read2_Feed(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read3_Configuration(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read4_Configuration() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at FergusonMoriyama.Umbraco.FeedCache.Configuration.DeSerialiseFromDisk() at FergusonMoriyama.Umbraco.FeedCache.FeedCacheApplicationBase..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at umbraco.BusinessLogic.Application.RegisterIApplications()
Is this to do with the format of the feed itself? THere are a couple of line breaks in there that seem wrong but otherwise there does not seem to be a problem with the format of the feed.
Hi Barry - What is at character 6 on line 88 of the feed - that is what the error is complaining about.
As Darren says, the character at 6,88 is invalidating the XML.
Character is question is the £ pound symbol. That needs to be converted to an HTML entity for it to work. Unless you've got any influence over the source of the RSS feed, there isn't much you can do about it. (Well you could write a custom function to filter/replace the dodgy characters?)
Hi guys, thanks for your help with this. Its a strange one - if I copy the whole feed XML and create a local file, it works fine. But if I point it at the actual live feed, I get the error as described. I can only think that it is to do with
That said if you visit the feed in a browser it renders as an RSS feed fine. I validated it on W3C and it points out it does not validate due to date format, duplicate GUIDs and line breaks in the link elements. However I have not changed any of these things in my local version and FeedCache works fine.
I can request the feed format be changed to accomodate the system, but at the moment I cannot definitively say what it is that is causing it to break.
@Lee - if I go to Line 6 col 88 in the raw feed, it is the letter 's' in the middle of a link.
Just to follow up on this, I got the original developer to clean up the feed and deploy it, but the issue is persisting. I have ensured I have updated the config and restarted IIS:
I know it is not a general problem as I have many other feeds connected and it caches them perfectly. The very strange thing is if I copy this file locally and save it as a flat XML, it is cached fine. Which is annoying, as I cannot narrow down the cause of the problem.
@Darren, would you mind terribly throwing your eye over it and perhaps even seeing if you are experiencing the same issue? Just so I know its not my system. I have traced all the way through the feed and gone to the character position supposedly causing the exception, but it is just a standard charatcer in the middle of a link. The error I get is below.
FYI The following much simpler feed throws the same error (on the same line number strangely!)
This one has no special chataers, it validates and I am out of ideas on why it would fail. Would be great if someone can corroborate the behaviour I am experiencing. :-)
With all sincerity, I still believe that it's the £ pound character that is causing you grief. (Honestly not trying to steer you on a wild goose-chase)
Only reason I can see the difference between testing this locally and remote is that the character encodings are different? Local is most likely encoding as UTF-8 (or een UTF-16?) and the remote server might be encoding in ISO-8859-1? I dunno it's difficult to judge.
As for the line numbers - I don't think they are literal line numbers, more that they are line numbers once the parser is trying to process the XML (juggled whitespace, etc).
Hi Lee. Thanks for being patient here. You must be right, otherwise it makes no sense. I got all £'s stripped out but it is still an issue. Would % case the same issue, you think? Seems a bit daft that the tool cannot handle these. THey are only in the content elements, not links. Pity as I have a system that is supposed to pull and cache 20 - 30 feeds, I thought Feed Cache would be ideal.. but its not viable if it does not have some means of exception handling
@Darren - any chance of the source? I will try catch out the errors and just not include any offending rss items in the cached feed. You can release as an update to the community if you like :-)
Feed for your reference:http://tescoplc.webdev.merchant.co.uk/tertiary-content/press-release-search?rss=true&set=all
Error is caused on line 28 col 98, but as you say Lee it ismpossible to tell where the tool sees lines and cols, looking at it through view source shows nothing suspicious anywhere near that position.
The source is up on Darren's BitBucket account: https://bitbucket.org/darrenjferguson/open-source-umbraco-packages
Curious to know what the problem is too now. Let us know if you figure it out. Good luck!
SOLVED! After debugging Darren's source I realised it was the Deserialize method throwing the error - i.e. my local FeedCache.config file! Hadn't even crossed my mind.. Once I made that leap the error was obvious (if not a little embarrasing):
Thanks for your persistence Lee... prob would have saved hours of messing arround if my posted feed URLs were not shortened in my posts. Ah well hopefully I will save someone else that by posting here. Now I've got to tell the guy I've had tweaking the live feeds for me all day...
When you say replace the &'s with & do you mean to retype them or use the & amp ; ?
I am having exactly this problem with a twitter feed.
Hi Chrise, you are correct, it stripped my code from my last message. Replace your ampersands with & amp ;
Failing that you can try the HTML encoding notation (% 7E or something) .. But the above worked for me.
I'm getting a different error message now, object reference not set to instance of an object, but thanks for your help.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted