Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Bug] XML Parsing Error when using Audioscrobbler

edited July 2006 in Vanilla 1.0 Help
I was getting an XML Parsing Error for both Atom and RSS feeds, tried a few other Vanilla sites and some were also giving the error and some were not, so it wasn't nessesarily my tinkering that was to blame. I turned off all extensions to get a vanilla 'Vanilla' and then enabled them individually and tried the feed. The culprit appears to be Audioscrobber as it was the only extension that caused the parsing error: XML Parsing Error: xml declaration not at start of external entity Location: http://www.url/vanillalocation/?Feed=RSS2 Line Number 2, Column 1:<?xml version="1.0" encoding="utf-8"?> ^


  • edited July 2006
    Is this when using the Audioscrobblerizer extension?

    Edit: oh right, I see what you mean, it happens on my forum too. I'll take a look,
  • same problem in the DIGG and in the Weight-Word Extension.
  • edited July 2006
    The problem is due to these extensions adding an extra line break into the RSS/Atom feeds at the start, causing it not to validate. The rest of the feed is valid, its just this extra line break causing the problem. I have no idea what's causing this. The digg extension I wrote is very much the same as the audioscrobbler one, so thats why it occurs on both of them. Alex
  • edited July 2006
    This worked for me: I split the default.php into two 1) the part the Alex wrote & 2) a lastRSS.php file Then added a line to default.php after the extension information: require ('lastRSS.php'); I then put both files in the Audiscrobbler folder and then re-enabled the extension. And as far as I can tell there seems to be no problems with the feed or any parsing errors. EDIT: Just tried the feed with Firefox & Sage and RSS Reader and got no problems at all
  • Thanks so much MethCat. I've uploaded the changes and also fixed an issue with the cache (so it now actually works!). The cache is set to 20 minutes (1200 seconds), so if you don't notice your songs updating; it's probably cached! If you need to you can adjust the cache by editing the default.php file.

    Download Link:
This discussion has been closed.