Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

XML in header for 4.2.1

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-28-2009, 09:06 PM
 
steve.thompson steve.thompson is offline
 

eXpert
  
Join Date: Feb 2009
Location: Sydney, Australia
Posts: 302
 

Question XML in header for 4.2.1

Hi All.

I was having a problem with my store which was identified by Jon at WebsiteCM as an XML header line in all of my customer pages. I've looked at a few other 4.2.1 sites and they are also showing an xml line at the start of their pages.

It looks like it comes from the skin1/customer/home.tpl file, the first couple of lines look like this:
Code:
{* $Id: home.tpl,v 1.100 2008/12/11 08:02:53 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {* <?xml version="1.0" encoding="{$default_charset|default:"iso-8859-1"}"?> *} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> {config_load file="$skin_config"}

Anyone running 4.2.1 ? Display any of your customer pages in your browser then view the source. Do you see
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
as the first line?

This line was in the distribution files from QT. Any experts here? Is the solution to remove the "xml" line from skin1/customer/home.tpl ? Is this a bug?

Thanks, Steve.
__________________
X-Cart Gold 4.2.1 / 4.4.2
X-AOM, X-SpecialOffers
Download Expander 2.1.3 / 2.2.0
Reply With Quote
  #2  
Old 05-29-2009, 01:55 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: XML in header for 4.2.1

What was the problem you were having?
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 05-29-2009, 05:30 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: XML in header for 4.2.1

I have it and it shows like this on output pages
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
No problems at all, it also validates with w3
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 05-29-2009, 05:34 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: XML in header for 4.2.1

Moving to the 4.2 template area.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-29-2009, 01:11 PM
 
steve.thompson steve.thompson is offline
 

eXpert
  
Join Date: Feb 2009
Location: Sydney, Australia
Posts: 302
 

Default Re: XML in header for 4.2.1

I'm using FTS SiteMaps. For sites with a lot of products, it has a cached version for faster display and to reduce server load, by making up an html page. That html page was not displaying. I reported the problem to Jon and here is his reply:
Quote:
Hi Steve,

Your site header is issuing code to tell browsers that the site is an xml document, which it isn't. This is on all pages and really needs to be corrected not just to rectify this sitemap issue, but because it will also cause other errors.

The code in question is attached.

Quote:

<?xml version="1.0" encoding="iso-8859-1"?>

Your template should be edited so that this is not appearing in your source code. Likely this code is coming from skin1/customer/main/home.tpl or from a php file.

Jon Peters


So, seems that you should not have an xml header in an html file. It was appearing in all customer pages, not just the sitemap page.

It seems to be coming from the skin1/customer/home.tpl file. I commented that line out and problem fixed. This line in home.tpl is in the QT distribution file that I received for 4.2.1 so, is this a bug in the QT distributed file?

Steve.
__________________
X-Cart Gold 4.2.1 / 4.4.2
X-AOM, X-SpecialOffers
Download Expander 2.1.3 / 2.2.0
Reply With Quote
  #6  
Old 04-16-2010, 05:24 AM
 
susanhoover susanhoover is offline
 

Newbie
  
Join Date: Nov 2009
Posts: 1
 

Default Re: XML in header for 4.2.1

I got the same error when I put the Google-site-verification line above the xml declaration line. When I moved the Google line down, it worked OK.
__________________
4.3
AOM
Reply With Quote
  #7  
Old 02-09-2011, 02:18 AM
  JeanB's Avatar 
JeanB JeanB is offline
 

eXpert
  
Join Date: Oct 2009
Location: Worcestershire, UK
Posts: 217
 

Default Re: XML in header for 4.2.1

Hi All,

Sorry to bump an old topic ...

I've just tried to verify with W3C and it has come up with the error :

Line 2, Column 6: XML declaration allowed only at the start of the document

However, it IS as the start of home.tpl!?

Reading this topic, I wondered what it would do if I removed it from the template.

And my site verifys perfectly now ... ? And there are no loading errors at all?


Is it OK to remove this!!?
__________________
4.2.3
X-Cart Gold
BCSE Address Book | XCartMods QuickFind | X-RMA | X-Offers
-------[installed]----------------------[installed]--------------[installed]----[installed]--



5: in development
Reply With Quote
  #8  
Old 02-09-2011, 02:51 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: XML in header for 4.2.1

Make sure it is actually as first line of the html doc. No spaces, empty lines or anything else before it
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 02-09-2011, 02:54 AM
  JeanB's Avatar 
JeanB JeanB is offline
 

eXpert
  
Join Date: Oct 2009
Location: Worcestershire, UK
Posts: 217
 

Default Re: XML in header for 4.2.1

Well, putting it back in, it is definitely at the very, very top of home.tpl.

However, I viewed the source & it is appearing at line 2!


So, what's before it?!
__________________
4.2.3
X-Cart Gold
BCSE Address Book | XCartMods QuickFind | X-RMA | X-Offers
-------[installed]----------------------[installed]--------------[installed]----[installed]--



5: in development
Reply With Quote
  #10  
Old 02-09-2011, 02:57 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: XML in header for 4.2.1

Well something is putting a line before it, could be home.php, check the script
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:29 AM.

   

 
X-Cart forums © 2001-2020