Welcome, visitor! [ Login | Sign Up ]

Recent Blogger Update Breaks Several Templates



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’.

div-tag-error.jpg

The actual problem is now new xml Blogger templates cannot contain any “div” tags in the “head” section. Previously this was a popular way to embed certain javascript functions to get features like cool individual dates to show on each post.

The templates on this site that were affected thus far were Mush Blue, Aspire, iTheme, Blogy Web 2.0, SummerFruit, FTW, and sIMPRESS. These are all templates that utilize a special javascript date function which was causing the error. These have since been fixed and now work properly.

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.

Your exact function may vary so just look for the javascript by searching for “<script>” at the bottom of the “head”.

<script>
function replace_date(d){
var da = d.split(' ');
day = "<div class='day'>"+da[2].replace(/,/,"")+"</div>"; // 12
month = "<div class='month'>"+da[1].slice(0,3)+"</div>"; // December
document.write(day+month);
}
</script>

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!

Ready to super charge your blog? Check out our professional premium blogger templates or make money by joining our blog affiliate program!

If you like this post then please consider subscribing to our eBlog Templates RSS feed. You can also subscribe by email and have new templates and articles sent directly to your inbox.




Trackbacks

  1. Plantillas para Blogger, recursos y herramientas » Error en Blogger al insertar etiquetas div en la sección head. on March 17, 2008

15 Responses to “Recent Blogger Update Breaks Several Templates”




   
Heng Kang Yong on Mar 7, 2008, 7:20 pm  

I use the Aspire template but it seem does not work well on me. I cannot see the date.. What should I do to fix this problem?


   
David on Mar 8, 2008, 4:38 am  

Heng Kang Yong, You need to change the date format in your blogger settings => formatting tab. Once you adjust it based on the Aspire instructions, it will work properly.


   
Sheena on Mar 13, 2008, 3:58 am  

Hi, this is a very informative post. Uhm, I have problem with “moving the script” to body, from head. Because I found it already in the “body” but I still have the same error. What should I do? 🙁


   
Zlamushka on Mar 21, 2008, 4:10 am  

Wow, you are absolutely amazing. Thank You so much, mine just worked. I was almost getting desperate, muah (hugs)


   
Willowtree on Apr 7, 2008, 2:05 am  

“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!”

You’re kidding aren’t you, that’s precisely why I went to TypePad. The Blogger crew are as close to “change it and hope for the best” programmers as you’ll find in professional IT development.


   
David on Apr 7, 2008, 5:57 am  

Willowtree, yeah their support is slow and people cry for help all the time. Some bloggers think it’s the template they are using and complain to the designer when in fact, it’s a general problem with Blogger. I hope you’re happy with Moveable Type. Are you using their new Vox product or just the regular TypePad blog?


   
kybellarose on Jun 24, 2008, 1:14 pm  

with the aspire template and the new intense debate comment section installed, I find that it says

this…This entry was posted at Monday, June 23, 2008 and is filed under…

This entry was posted at (supposed to be time here??) ( and on date supposed to be here) Monday, June 23, 2008 and is filed under…blah blah …

however when I change the blogger settings to the correct format it screws the top left thing which is supposed to have the date in it?

when I try to fix it in the actual layout widgets, the same thing happens to the top left, however it reads right??

Can you advise:?:

any help would be greatly appreciated. This template has just been installed in the last 10 days.


   
Shiok Guy on Jun 27, 2008, 7:10 pm  

I am using the Ads Theme, if I am using Draft Blogger I cannot creat new post it does not work when I press publish or save draft.

If i revert back to Normal Blogger dashboard, I can create new post as normal. Any take?

Shiok Guy


   
lil_girl on Aug 25, 2008, 2:39 am  

hey..i wanna ask whether i can have my old template back again after i revert it?and i didnt copy a backup for my previous template..=(..help me A.S.A.P


   
K on Sep 13, 2008, 2:37 am  

I tried uploading the ‘aspire’ and keep getting a message about something not being parsed and about closing html with> Also, wass advised to contact blogger with this code bX-9khcxc
All I want to do is to load back aspire!!


   
Lucas on Oct 1, 2008, 9:05 pm  

My Aspire template does not show the date properly.

i tried to solve the problem in many ways, but im not familiar with coding.

is there a way to fix this problem? or a way to erase the yellow box where the date should appear?


   
halim on Feb 19, 2009, 12:15 pm  

i have problem for Blogger Bx-Codes :S
can you help me for it ?
my url :
Savaş


   
Savaş on May 28, 2009, 7:58 pm  

hello guys here have posts for childrens, please visit and comments for war! and say no to war! Savaş and for more Unicef Turkey


   
Avi on Feb 10, 2010, 7:56 am  

I use the aspire theme and I am having trouble with the date of the post function. If you go to my blog you can see that it says undefined. What do I have to do? Thanks