Blogger has done it again. They’ve released another round of “fixes” that ended up causing us more trouble than good. Within the last week or so, Blogger released at least one noticeable change to their xml parser. How do I know this? Because several readers started complaining about our templates not working so I decided to put on my detective hat and figure it out.
The Blogger xml parser (the engine that compiles and validates the xml code), is now a little more strict. In the past, you could stuff “div” tags within the “head” section and the parser wouldn’t throw any errors. No longer is that the case. Here’s the nice error message that I’m sure many of you are scratching your heads about. “Your template is invalid because the tag ‘div’ appears inside of the tag ‘head’.”
If you’ve downloaded these templates in the past from eBlog Templates and are now getting this error message, you’ll either want to download and reinstall the template again or move the following function out of the “head” section and into the “body” section.
var da = d.split(' ');
day = "<div class='day'>"+da.replace(/,/,"")+"</div>"; // 12
month = "<div class='month'>"+da.slice(0,3)+"</div>"; // December
Of course, backup your template before making any changes just in case you need to revert back. After you resave, everything should work again. If not, leave a comment below and we’ll try to help.
Let’s keep our fingers crossed that Blogger makes a better announcement each time they release a so-called “fix”. Either that or they do a better job testing!