Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Firefox XML problem

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 6983 Views
  • nodevice
    Avatar
    Community Member
    37 Posts

    Firefox XML problem Link to this post

    I'm implementing my first Silverstripe site but I get this XML error when I try to see my site with Firefox 2.004 (the site works fine on IExplorer 6 and on my PSP browser), my hosting is Dreamhost

    The URL for my SS site is: www.naciondnb.com/site/
    The homepage is: www.naciondnb.com/site/home/ (based on article_holder)

    The error is (sorry it is in Spanish):

    Error de parseo XML: intrucción de proceso XML no se encuentra al inicio de la entidad externa
    Lugar: http://www.naciondnb.com/site/home/
    Línea 3, Columna 1:<?xml version="1.0" encoding="UTF-8"?>
    ^

    Screenshot: http://www.naciondnb.com/error.jpg

    Othe pages are:
    http://www.naciondnb.com/site/agenda/
    http://www.naciondnb.com/site/audio/
    http://www.naciondnb.com/site/bio/

    Hope someone could help me!

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Firefox XML problem Link to this post

    XML Parsing Error: xml declaration not at start of external entity
    Location: http://www.naciondnb.com/site/bio/
    Line Number 3, Column 1:<?xml version="1.0" encoding="UTF-8"?>
    ^

    The problem with the error means you've got some lines before the <?xml tag, which is only allowed on the first line in your template.

    There seems to be some blank white space at the top of your document before the <?xml tag. Please try removing this and see if it makes any difference.

    Cheers,
    Sean

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Firefox XML problem Link to this post

    Thank's Sean for the help, I'm trying to find where to remove the blank lines, I've checked the page.ss template and the XML declaration is at line 1 of the code, wich other files could be causing the blank lines??

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Firefox XML problem Link to this post

    Hmm, that's strange... I've never had that problem before.

    Have you also tried ?flush=1 at the end of the URL, perhaps it is caching somewhere?

    Cheers,
    Sean

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Firefox XML problem Link to this post

    That problem often occurs when you start writing php

    if you have a php file like this:

    <?php
    ....
    ....
    ....
    ?>

    with a blank line after ?> then you can be in trouble .... If you changed any of the php files,I would check those ...

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Firefox XML problem Link to this post

    Yes I did flush, I think is actualy a error in one of my templates called audio_holder
    made based on article holder and with the same principles from the tutorials.

    I publish the page www.naciondnb.com/audio/ with that template and the error appears, when i publish it but i choose not to show it in the main menu, everything's fine.

    I'll try to figure out what's wrong with that template and i'll let you know!

    Thank's for the help!!!

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Firefox XML problem Link to this post

    Thank you so much Nicolass!!!

    That was the problem, I removed a pair of blank lines after the ?> in my AudioHolder.php file, and everythings is fine now!!!

    Thank´s again!!!!!

  • CodeGuerrilla
    Avatar
    Community Member
    105 Posts

    Re: Firefox XML problem Link to this post

    I just had the same problem when I downloaded a SS site from a live server (Linux) and put it back on a WAMP server I got the error on the login page, I checked all of my PHP code and template to no avail as I don't really code in such a way that allows spaces below the closing PHP tag

    The problem I found was in quite a few files in the sapphire/security/ directory.

    I guess someone (a dev) needs to go through all of the SS core files and either remove the PHP closing tag or remove the white space(s) below it.

    Two Words: Coding Standards

    6983 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.