My template wouldn't save when I tried to add META tags earlier this afternoon. I got the dreaded error message from Blogger, “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 “META” must be followed by either attribute specifications, “>” or “/>.”
I've known about and used META tags on websites for many years. I decided today it was high time I got them added to Out of Debt Again.
I did some research – one place I found was Dummies Guide to Google Blogger Beta's Top 10 SEO Tips for Blogs. I checked out some metatag generators and viewed the source on a few blogs.
Finally I was ready to add the tags to my template. I went to my Dashboard, clicked on Layout and Edit HTML. I found the [Head] tag, and entered my META tags directly below that.
Right away Blogger gave me the error I mentioned earlier. “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 “META” must be followed by either attribute specifications, “>” or “/>.”
Essentially this means your template cannot be saved. You are stuck here, until you figure it out. And hopefully you downloaded a copy of your template prior to beginning this little experiment. Because if you can't figure it out, you can always upload your previous working template.
I then started googling for the answer to my problem. I found a lot of sites that said I need to add a closing slash and that would solve my problem. But try as I might, I could not get it to work.
After two hours of searching and experimenting, and finally uploading my last saved template, I decided to put only the first few words into the description. That worked! I put a few more words. That didn't work. Just out of curiosity, I removed the apostrophe “s”… apparently that was my problem all along!!
So if you use any of Dan Rubin's Thisaway templates, you may have the same problem adding in META tags, if you include an apostrophe. Here's a screenshot of the error message and the HTML.
Here's a screenshot of the corrected HTML which finally worked for me.
Good luck putting in your META tags.
Thank you for visiting Out of Debt Again! Subscribe to receive free email or RSS notifications and don't miss anything!
This was really helpful to me! Thanks so much!
[Reply]
You are very welcome, I figured someone else out there was going to have the same issues and wanted to let folks know how I accidentally solved it. THANK YOU for commenting and letting me know! Have a wonderful day!
[Reply]