1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Importing a style gives error

Discussion in 'Resolved Bug Reports' started by Junior, Apr 17, 2011.

  1. Junior

    Junior Well-Known Member

    When I attempt to import a style I get the following error:
    The XML I am importing is a copy of a style already on my site that I exported. I've tried exporting it multiple times. I've tried uploading it as a new style and overwriting. XenForo 1.0.1
     
  2. Wuebit

    Wuebit Well-Known Member

    Did you check the XML out is it all closed right?
    Sounds corrupted
     
  3. Junior

    Junior Well-Known Member

    </templates>
    </style>

    Thats the last two lines.
     
  4. Wuebit

    Wuebit Well-Known Member

    Seems right hmmm
     
  5. Junior

    Junior Well-Known Member

    Oddly enough it downloads one of my other styles and imports it just fine. Seems to be something going wrong with just this one xml
     
  6. Wuebit

    Wuebit Well-Known Member

    Maybe pastin it up so people can see why its not working :) (if thats the case)
     
  7. Junior

    Junior Well-Known Member

    It's actually a unique skin that I'd like to stay one of a kind :/ I'll post a ticket.

    Edit: Solved, going to attempt to duplicate error.
    Edit: Reproduced. I edited the google_analytics template replacing this line:

    Code:
    var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview']];
    
    With this:

    Code:
    var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_setDomainName','www.website.com'], ['_trackPageview']];
    
    Note: Dug deeper and found thats not the problem. Any edit of the google_analytics template seems to cause the XML error.
     
  8. Wuebit

    Wuebit Well-Known Member

    Sorry it worked for me after editing that template.
     
  9. Mike

    Mike XenForo Developer Staff Member

    It may be related to the "]]" looking like the end of CDATA. I will have to confirm though.
     
  10. Junior

    Junior Well-Known Member

    I'm going to send in a ticket. When restoring the analytics template, I was able to import it but the js_head and the page_container template had missing data causing the site to render oddly. I had to go and copy the data from the old template to the new one.
     
  11. Mike

    Mike XenForo Developer Staff Member

    Just for reference, I edited the analytics template (just to add a space) and was able to export and import the resulting style XML. You'll need to provide the XML that doesn't work for you.
     
  12. Junior

    Junior Well-Known Member

    I've been meaning to send in a ticket. Just being lazy and all. I'm going to mention now, when reverting the template and uploading the pm, a few of the templates were messed up. They the page_container and js_head (idk full name off the top of my head) we're missing lines. These are both customized templates. I had to copy and past them from the original xml for things to display properly.

    I'll get a ticket up now.
     
  13. Mike

    Mike XenForo Developer Staff Member

    Turned out to be this line:

    // /* ]]> */</script><script type="text/javascript"

    Which contains the end of a CDATA string.
     
  14. Mike

    Mike XenForo Developer Staff Member

    CDATA string ends are now escaped in during the template export (and replaced during import).
     

Share This Page