Blogger Error Messages
Oh. You know them. You've seen them. The nasty red font above your template edit window after you attempt to save your template or even preview your work. Jeering at you with:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: Element type "href" must be followed by either attribute specifications, ">" or "/>"
or
More than one widget was found with id: HTML3. Widget IDs should be unique.
Makes my skin crawl. But, you can battle the error message...and be victorious!!
I think the two examples above are probably the most commonly seen messages. At least for me they are. The first example can have a variety of elements in the "href" spot. Sometimes it is like fill in the blank. But, the thing to focus on is the ">" or "/>". I noticed, while working on a template yesterday for Pauls Health Blog, that I kept getting this error...with "div" as the element. It said that a "div" element wasn't closed properly. I checked and checked. Nothing looked out of place. But, the code I put in had "/>" at the end of it. And where I put the code, it already had the closing tag a bit further down. Finally I spied that little "/". That was the culprit. I removed the "/" and was finally able to save the template.
Lesson here is if you get this message, look carefully at the exact code you just put in. Does it have the "/" at the end with the ">"? If so, remove it. Or, controversially, if you get the error and it doesn't have the "/" at the end, slip it in!
The second error message comes up when adding code to your template that has already named the widget. It is easy to fix. Find the culprit in question and renumber it. It doesn't make any difference what number, just as long as it doesn't occur anywhere else in your template. It wants to be unique.
21 Comments:
I'm sure I hate those error messages just as much as you do! :)
The worst part is when you see the message... but for no reason at all, there's nothing you can do to fix it. It's as if you go through each line of code and spot check each element, but in the end, its just a small error that does it :)
Thanks for the helpful post :D
I cringe when this happens to me. I have gotten in to the habit of saving more frequently to avoid losing my work. I certainly try to avoid coding mistakes...sometimes to no avail. Thanks for this very helpful and informative post.
Thanks for this Annie - you are a life saver. I always get the error message when I try to add a title, description and keywords to my site between the head tags, so hopefully my problems will now be solved!
Thanks once again.
useful post man! it would help bloggers in this tedious & boring work of finding errors in template code.
I usually have a problem with the closing "/". I forget about it totally and will keep breaking my head to find where the error is.
Yes,this is a pretty simple problem and often forgotten too which includes me too..!I will be more cautious while adding a close tag..for adding title and more for my blog onwards..!Thanks for sharing..!
Yes..most of the time I get stuck only by that simple mistake..!some how got it figured out..!Well your post could really help the rest of the bloggers..!Thanks for sharing..!
I recommend everyone who is struggling with markup get their hands on a basic XHTML book. This will clear up all your questions regarding when to use /.
Your code is the best and easiest to understand.If you have a long list of labels in your sidebar,you could be losing valuable space to display other information instead you can use a drop-down menu.This takes up very little space at all, and is useful for helping your readers find the information they need.It is always good to back-up your template before making any modifications.
thank you for this information
You are finished with some quality content and in the end when you are about to post your content and share it with the world you recieve soem obnosious error....it really gets depressing
Very informative :)
Somtimes you get a lot to learn from such posts..
Thanks again
Error messages, it makes me sick sometimes especially if I'm in a hurry to submit some reports...It is a waste of time finding where did I get wrong...If you forgot to save your work well you have no choice but to type it again...This is a good tip for all...Thank you for sharing this information.
thanks for the useful info keep up the good work
very informative :X .. really thank you for this information
Thank you so much for those tips that saved me a lot of time.
After having to deal with permissions and other problems during the installation, I surely know how frustating it could be to think that you are finally there and then you get those depressing red lines...
You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.
Terrific blog post! Thank you.
I discovered a whole lot right after learning through the details that you published in this article. You provided quite a few extra factors which I never ever thought about. This is terrific.
I was looking for this...a BIG thank you! This particular website is a great resource weblog for this type of content. I totally appreciate this!
There are easy solutions to those problems. You just have to insure to define your path properly. But I know the programs could be too smart sometimes.