Skip to main content

Problems Adding / Editing The HTML And Text Gadgets

We're seeing a few reports, in Blogger Help Forum: Something Is Broken, mentioning problems adding or updating the HTML and Text gadgets.

The most common symptom, when reported, is very simple.
When I try to update the gadget, all that I see is
In this case, we have to first explain that "javascript:void(0);" is not the problem - it's simply a symptom of the problem.

Once we explore the problem itself, we see various possible causes.

The base cause for problems with the HTML / Text gadget is simple - the script which processes gadget updates provides no diagnostics when detecting errors.

If you update a post (using Post Editor), or the template (using Template Editor), with bad code, you generally see some error message, indicating that your changes are bad.

Both Post Editor and Template Editor provide some diagnostics, when errors are detected. With the HTML / Text Gadget, the script issues no error messages, it simply stops.

Instead of "javascript:void(0);" displaying for a fraction of a second, as the update is saved and the window closes, you are left looking at
until you hit "Cancel", in frustration.

The HTML / Text gadget has been observed to have various problems, which prevent changes from being properly saved. If you are looking at "javascript:void(0);" right now, after having repeatedly hit "Save", there are several possible causes for this symptom.
  • Bad HTML, when accidentally in HTML mode.
  • HTML / JavaScript code which contains line breaks in the wrong places.
  • Bad HTML code, when intentionally entering an HTML gadget.
  • Gadgets with blank titles.
  • Layered security, which blocks the gadget update scripts from running.
  • Trying to use a non supported browser version.
  • Changes to the blog or post template, unwisely applied by the blog owner.
  • Using the wrong menu selection, in "Add a Gadget".

Blog owners who are not observant, when updating the gadget, may accidentally be in HTML mode. Rich text, containing HTML significant characters, will be a problem.

HTML / JavaScript code is sensitive to line breaks in the wrong places in the code. Blog owners, accidentally or intentionally inserting line breaks, can cause a problem.

HTML / JavaScript code, in general, is syntax sensitive. Bad code will always be a problem.

Gadgets with blank titles will cause a problem, when using some browsers. If a gadget with a blank title is specifically required, it may be possible to use a null title, instead.
<!-- -->

Inappropriate use of layered security may block cookies or scripts, and prevent the gadget from updating. This can include browser add-ons, as well as security applications. The owner may intentionally cause this problem - or this can be entirely without owner involvement.

The gadget, like every other Blogger feature, must be updated to support newer browser versions. It will likewise be updated periodically, to remove support for older browser versions. Non supported browser versions will frequently cause problems.

Blog owners can make unwise changes to the blog or post template, which can interfere with gadget code, elsewhere in the template.

Finally, some blog owners can be using the wrong menu selection in "Add a Gadget" - and adding "XML", instead of "HTML/JavaScript".

Some of these error scenarios should be more clearly identified, by the script - but not all can be identified. Attempting to save a gadget with a blank title, for instance, should produce a stern warning
Blank titles are not accepted.
Unfortunately, HTML syntax errors generally can't be consistently diagnosed, with any detail.

The best solution here is for the blog owners to be aware that the gadget operates this way, when being updated. Some cautious effort must be made, when updating the gadget.

It's possible that problems updating the gadget, like many Blogger problems in general, can be best diagnosed using affinity testing, and / or differential testing.


Popular posts from this blog

Adding A Link To Your Blog Post

Occasionally, you see a very odd, cryptic complaint I just added a link in my blog, but the link vanished! No, it wasn't your imagination.

What's The URL Of My Blog?

We see the plea for help, periodically I need the URL of my blog, so I can give it to my friends. Help! Who's buried in Grant's Tomb, after all? No Chuck, be polite. OK, OK. The title of this blog is "The Real Blogger Status", and the title of this post is "What's The URL Of My Blog?".

Embedded Comments And Main Page View

The option to display comments, embedded below the post, was made a blog option relatively recently. This was a long requested feature - and many bloggers added it to their blogs, as soon as the option was presented to us. Some blog owners like this feature so much, that they request it to be visible when the blog is opened, in main page view. I would like all comments, and the comment form, to be shown underneath the relevant post, automatically, for everyone to read without clicking on the number of comments link. And this is not how embedded comments work.