Widget generated code I have no idea where I am missing

  • George L.
  • Bronze Member
  • Bronze Member
  • George L.
  • Posts: 2209
  • Loc: Malaysia

Post 3+ Months Ago

Code: [ Select ]
 
<style type="text/css">@import url(http://www.answers.com/main/css/answ_widget.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="http://www.answers.com/main/js/pngfix.js"></script>
    <![endif]-->
    <div class="roundedBlack" id="answ_widget">
    <b class="bs"><b class="bs1"><b></b></b><b class="bs2"><b></b></b><b class="bs3"></b><b class="bs4"></b><b class="bs5"></b></b>
    <div class="bsfg">Travel<br/>
    <div id="answ_middle"><div id="answ_inner">
    <script language="JavaScript"  src="http://www.answers.com/main/getRss.jsp?type=5&tid=2026&answered=true" type="text/javascript;"></script>
    <noscript><style type="text/css">#mywidget{display:none;}</style><iframe src="http://www.answers.com/main/getRss.jsp?type=5&tid=2026&answered=true&responseType=iframe;" style="width:300px;height:300px;border:1px solid blue;"></iframe></noscript>
    </div></div><a href="http://wiki.answers.com" target="_blank"><img src="http://www.answers.com/main/images/widgets/watravelmini-b.png" alt="" /></img></a>
    <div id="answ_widglink"><a href="http://www.answers.com/main/widget_gallery.jsp" target="_blank">Get your own widget</a></div>    
    </div>
    <b class="bs"><b class="bs5"></b><b class="bs4"></b><b class="bs3"></b><b class="bs2"></b><b class="bs1"></b></b>
    </div>
 
 
  1.  
  2. <style type="text/css">@import url(http://www.answers.com/main/css/answ_widget.css);</style>
  3.     <!--[if lt IE 7.]>
  4.     <script defer type="text/javascript" src="http://www.answers.com/main/js/pngfix.js"></script>
  5.     <![endif]-->
  6.     <div class="roundedBlack" id="answ_widget">
  7.     <b class="bs"><b class="bs1"><b></b></b><b class="bs2"><b></b></b><b class="bs3"></b><b class="bs4"></b><b class="bs5"></b></b>
  8.     <div class="bsfg">Travel<br/>
  9.     <div id="answ_middle"><div id="answ_inner">
  10.     <script language="JavaScript"  src="http://www.answers.com/main/getRss.jsp?type=5&tid=2026&answered=true" type="text/javascript;"></script>
  11.     <noscript><style type="text/css">#mywidget{display:none;}</style><iframe src="http://www.answers.com/main/getRss.jsp?type=5&tid=2026&answered=true&responseType=iframe;" style="width:300px;height:300px;border:1px solid blue;"></iframe></noscript>
  12.     </div></div><a href="http://wiki.answers.com" target="_blank"><img src="http://www.answers.com/main/images/widgets/watravelmini-b.png" alt="" /></img></a>
  13.     <div id="answ_widglink"><a href="http://www.answers.com/main/widget_gallery.jsp" target="_blank">Get your own widget</a></div>    
  14.     </div>
  15.     <b class="bs"><b class="bs5"></b><b class="bs4"></b><b class="bs3"></b><b class="bs2"></b><b class="bs1"></b></b>
  16.     </div>
  17.  
  18.  


I am trying to add this onto my blogger. I got this error message:
Quote:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "tid" must end with the ';' delimiter.


I have tried searching for the word "tid" but it is nowhere to be found in the script above.

Thank you if you know the solution to the problem above?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

When I go to their site and copy the same code there is no semi-colon at the end of the url for the iframe.

Code: [ Select ]
   <noscript><style type="text/css">#mywidget{display:none;}</style><iframe src="http://www.answers.com/main/getRss.jsp?type=5&tid=2026&answered=true&responseType=iframe" style="width:300px;height:300px;border:1px solid blue;"></iframe></noscript>


If you look at the same part of the code you posted you'll see there's a semi-colon at the end of the src url for the iframe, which I don't think is supposed to be there. Maybe that's throwing off the parser.
  • George L.
  • Bronze Member
  • Bronze Member
  • George L.
  • Posts: 2209
  • Loc: Malaysia

Post 3+ Months Ago

Hi RichB,

Thanks for checking that out. I forgot to mention that I have changed the <iframe> line to include a semicolon, only, after I realized that it was giving me that error. After changing that, it gives the same error.

Thank you for looking into that.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

In the SRC attributes of your <script> and <iframe> elements, you have un-entitied ampersands instead of their character-entity equivalents.

When the parser sees "&tid" followed by an equal sign instead of a semi-colon, it thinks there's a syntax error and that tid is a malformed character entity.

Try replacing those ampersands with their character-entity equivalents.

Code: [ Select ]
<iframe src="...&amp;tid=..."/>


You got the nice error message from blogger, they always give me a giant set of letters and numbers for an internal crash report code and pretty much say "We have no idea what the hell happened, please email us with as much information as you can about what you were doing". I end up having to deal with one of those every time I change my template.
  • George L.
  • Bronze Member
  • Bronze Member
  • George L.
  • Posts: 2209
  • Loc: Malaysia

Post 3+ Months Ago

Thank you, Joe. Now a new error message says:

our template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "answered" must end with the ';' delimiter.

Here is how it is now:

Code: [ Select ]
 
<style type="text/css">@import url(http://www.answers.com/main/css/answ_widget.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="http://www.answers.com/main/js/pngfix.js"></script>
    <![endif]-->
    <div class="roundedBlack" id="answ_widget">
    <b class="bs"><b class="bs1"><b></b></b><b class="bs2"><b></b></b><b class="bs3"></b><b class="bs4"></b><b class="bs5"></b></b>
    <div class="bsfg">Travel<br/>
    <div id="answ_middle"><div id="answ_inner">
    <script language="JavaScript"  src="http://www.answers.com/main/getRss.jsp?type=5&amp;tid=2026&answered=true" type="text/javascript;"></script>
    <noscript><style type="text/css">#mywidget{display:none;}</style><iframe src="http://www.answers.com/main/getRss.jsp?type=5&amp;tid=2026&answered=true&responseType=iframe" style="width:300px;height:300px;border:1px solid blue;"></iframe></noscript>
    </div></div><a href="http://wiki.answers.com" target="_blank"><img src="http://www.answers.com/main/images/widgets/watravelmini-b.png" alt="" /></img></a>
    <div id="answ_widglink"><a href="http://www.answers.com/main/widget_gallery.jsp" target="_blank">Get your own widget</a></div>    
    </div>
    <b class="bs"><b class="bs5"></b><b class="bs4"></b><b class="bs3"></b><b class="bs2"></b><b class="bs1"></b></b>
    </div>
 
 
  1.  
  2. <style type="text/css">@import url(http://www.answers.com/main/css/answ_widget.css);</style>
  3.     <!--[if lt IE 7.]>
  4.     <script defer type="text/javascript" src="http://www.answers.com/main/js/pngfix.js"></script>
  5.     <![endif]-->
  6.     <div class="roundedBlack" id="answ_widget">
  7.     <b class="bs"><b class="bs1"><b></b></b><b class="bs2"><b></b></b><b class="bs3"></b><b class="bs4"></b><b class="bs5"></b></b>
  8.     <div class="bsfg">Travel<br/>
  9.     <div id="answ_middle"><div id="answ_inner">
  10.     <script language="JavaScript"  src="http://www.answers.com/main/getRss.jsp?type=5&amp;tid=2026&answered=true" type="text/javascript;"></script>
  11.     <noscript><style type="text/css">#mywidget{display:none;}</style><iframe src="http://www.answers.com/main/getRss.jsp?type=5&amp;tid=2026&answered=true&responseType=iframe" style="width:300px;height:300px;border:1px solid blue;"></iframe></noscript>
  12.     </div></div><a href="http://wiki.answers.com" target="_blank"><img src="http://www.answers.com/main/images/widgets/watravelmini-b.png" alt="" /></img></a>
  13.     <div id="answ_widglink"><a href="http://www.answers.com/main/widget_gallery.jsp" target="_blank">Get your own widget</a></div>    
  14.     </div>
  15.     <b class="bs"><b class="bs5"></b><b class="bs4"></b><b class="bs3"></b><b class="bs2"></b><b class="bs1"></b></b>
  16.     </div>
  17.  
  18.  


I am a little impatient to check where exactly is the 'answer' entity. I have tried putting the ';' at almost everywhere of the links that references 'answer' but it did not work.

I have not felt this impatient for quite some time.
  • George L.
  • Bronze Member
  • Bronze Member
  • George L.
  • Posts: 2209
  • Loc: Malaysia

Post 3+ Months Ago

Any way, your solution has helped me to solve the first problem,(tid), Joe. Thank you, again.



joebert wrote:
You got the nice error message from blogger, they always give me a giant set of letters and numbers for an internal crash report code and pretty much say "We have no idea what the hell happened, please email us with as much information as you can about what you were doing". I end up having to deal with one of those every time I change my template.


I know the error message is nice, Joe, but I can not solve it, even though it is quite tidy -- the error message.


Thanks, again.

:)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Oh it's not a nice error message in general, just compared to the alternative it is. :lol:

9/10 times when you see an error message mentioning some random word in the same sentence as the word "entity", it's going to have something to do with a raw ampersand somewhere in your HTML.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.