Wednesday, February 9, 2011

How to fix bx-XXXX Error when uploading a blogger template

I am quite sure some of you have experienced the bx error when you try to upload a new blogger template. I have encountered this problem with my other blog and have found a way on how to fix this. When someone ask me on how to fix this, my reply is always to clear their offline data, cache and cookies. Unfortunately this fix will not work on most users. A specific example of this problem where many users were complaining and the number of comments reached to 788 (and couting) is the Ads Theme Template by EblogTemplates which I also used on my other blog.

Sample of these BX error codes are:
  • bx-bliced
  • bX-ev85ll
  • bX-39cc9q
  • bX-y6cz0v
  • bX-982020
Fortunately just today, I have found a fix from BloggerBuster (Thank you very much Amanda!) and here are the steps:
  1. First of all, try to upload your new template in the Layout>Edit HTML section of your dashboard. Not all templates have been affected by this issue, so it is advisable to check before attempting to edit your template significantly. If you do receive a bX-error code when trying to upload your template, you should proceed to step 2.
  2. If your new template is an XML file (with the .xml entension), browse to where this is located on your computer and right click the file. Choose to open with Notepad (or your favorite basic text editor). If your template is contained within a text file (for you to copy and paste into the template editor), simply open this with your text editor.
  3. Search for every instance of b:widget id= in your template, for example:

    • b:widget id='Header1'
    • b:widget id='Blog1'
    • b:widget id='Label1'
    • b:widget id='HTML1'

    Replace each of these IDs with the next number up. For example, Header1 should become Header2; Blog1 should become Blog2, HTML3 should become HTML4 and so on.
  4. Once you have changed each and every instance of widget id to a different number, you should save the template under a slightly different file name (to be aware of your altered file). If this is an XML file, be sure to save with the XML extension.
  5. Now you have made these changes, attempt to upload your file again in the Layout>Edit HTML section of your Blogger dashboard. Now you should not receive the error code and will be able to upload your template.
Amanda said, "If after following these steps you are still unable to upload your revised template, it is worthwhile to close your browser and delete all temporary internet files and cookies. Then restart your browser and try to upload again. Clearing all of these temporary files from your browser will ensure you receive a fresh page when editing your template. Previously when I have received error codes while editing Blogger templates, this technique has resolved the issue."

The reason why the bx-XXXX error occurs when you upload a template is because the Blogger developers
changed the way template editor accepts certain third party code. They have seen a lot of data corruption due to 'bad templates'.


Problems Previewing Changes to your Blogger Template? Here is a solution

On the Blogger Help forums I've noticed many people are experiencing bX-errors when attempting to preview changes to their template through the "Edit HTML" page.

This only seems to happen when the "expand widget templates" box is checked; it can even occur when no changes have been made to the template at all, or when trying to upload a new template.

I experienced this issue myself last week, and for a while I thought there was some issue with my templates (which are heavily customized). However, this also happened with new, default, un-customized templates. In my experiences of this issue, the error codes changed each time I tried to preview the template.

If you are experiencing this issue for your own blog, there is a simple solution for you: clear the cookies in your browser!


Once you have done this, refresh the page and log in to Blogger again (as clearing the cookies will clear your login information). Then when you attempt to preview your template, you should receive no errors and be able to edit your template code as required.

Note: Any changes to your template will not be saved! If it is important to save these changes, copy your entire template and paste into Notepad (or a different text editor) so you can access this after logging into Blogger again. 

How to clear cookies for your browser

Depending on your browser, you may have to try a different method to clear cookies. Here are methods for the major browsers:

For Internet Explorer 7.0

  1. Select "Tools" from your browser menu
  2. Select "Internet Options".
  3. Open the "General" tab.
  4. In "Browsing history" area click the "Delete" button.
  5. In "Delete browsing history" window click "Delete cookies" button and then click "Yes".
  6. Click Close and then click OK.

For Internet Explorer 6
  1. Select "Tools" from the browser menu
  2. Select "Internet Options".
  3. Open the "General" tab.
  4. Click the "Delete cookies" button.
  5. Click OK.
For Firefox 3
  1.  Select "Tools" from the browser menu
  2. Choose "Clear Private Data"
  3. Check the "Cookies" box
  4. Click the "Clear private data now" button.
For Firefox 2
  1. Select "Tools"
  2. Select "Options".
  3. Select "Privacy".
  4. In Private area click "Clear Now".
  5. In "Clear Private Data" window put the check mark for "Cookies" and click "Clear Private Data Now".
  6. Click OK.
If your browser is not listed here, take a look at this page which explains methods for all other major browsers.


For those of you running Windows, you may like to check out CCleaner. This is a freeware system optimization, privacy and cleaning tool. It removes unused files from your system, and really does make your computer run faster!

I've been using CCleaner for a few years now, and can honestly recommend using this. It usually takes less than a minute to run (unless you have not deleted temporary files for a LONG time!), and has cleared up the problem previewing my template each time it has happened for me.

Unfortunately CCleaner is not available for Mac users, though if anyone can recommend a similar program which may be of use to Mac users, please do let us know by leaving your comments below.

I'm not sure why this is happening; there is no mention on Blogger's Known Issues blog (yet), though I hope this information will be of use for those of you experiencing issues when previewing your template!