2.26.2014

How to fix Blogger Syntax Error (with a new template)

Hello! I'm just sharing a fix for a Blogger error when you're uploading a new template especially third party ones. I have tried expanding the gadgets, reverting to using the Simple Template or reverting to Classic Templates option. None of those solutions have worked in this situation.

This has happened to me several times with my international customers!  It has left me stumped because I can upload it just fine in my own accounts. I'm not sure why they get an error. I wonder if it has any relation to them using their first language in Blogger and the gadgets are worded differently? I honestly don't understand this error or why it happens. I just know how to fix it.


We were unable to save your template.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: (SyntaxError) : Unexpected token <


Most importantly, you need to backup your previous template. Go to Template and click on the Backup/Restore button in the top corner. Choose "Download Full Template".

Please keep in mind if you are added something extra in your template like IntenseDebate (commenting system), javascript etc. That by uploading a new template, you will be losing those codes.

THE FIX:

1) Backup your gadgets and graphics. Copy & paste everything in your gadgets to a Notepad file or a Blog Post draft.

2) Now go to the folder where your new template is stored. Find the XML file and right click on it to choose "Open With".... Notepad! 

3) Go to your blog, choose the Template tab and open Edit HTML. Paste the whole code in the box and do not press Save yet. Press CTRL + F and type in the box: PageList
 
You may need to scroll down and look for the highlighted code:




Change PageList1 to PageList2. Just change the number. Click save. There's your new template.

Every single time it has been the PageList gadget that has been causing this error. Hopefully this will help others!

Post a Comment

Tiny Moon © . Design by FCD.