Add Widget tool no longer works after upgrade.

Topics: ASP.NET 2.0
Feb 11, 2009 at 6:53 PM
I have just upgraded one website, Coal Energy Now, to the latest source file for BlogEngine.NET.  I just noticed that the Add Widget tool is no longer functioning.  I can select a widget in the drop-down list box, but when I click Add, nothing happens.  I have tried refreshing the page to no avail.  Not sure what to do...
Feb 11, 2009 at 8:01 PM
It looks like you have some unclosed META tags in your site.master file.  The 'description' and 'keywords' meta tags currently look like:

<meta name="description" content="...">
<meta name="keywords" content="...">

Those tags need to self-close:

<meta name="description" content="..." />
<meta name="keywords" content="..." />

Because they aren't correctly closed, the blog.js JavaScript file is not loading causing Add Widget to not work along with a bunch of other JavaScript errors I get when first arriving at your blog.
Feb 11, 2009 at 8:26 PM
Incidentally, I noticed BE already outputs "description" and "keywords" meta tags automatically.  I'm not sure if it's technically allowed to output the same Meta tags more than once.  So right now, you have 2 "description" meta tags and 2 "keywords" meta tags.  BE is outputting these tags in default.aspx.cs.

base.AddMetaTag("description", Server.HtmlEncode(BlogSettings.Instance.Description));
base.AddMetaTag("author", Server.HtmlEncode(BlogSettings.Instance.AuthorName));        

You could remove or comment out the first two lines since you already are outputting your own "description" and "keywords" tags.
Feb 11, 2009 at 8:31 PM
Thanks, Ben.  I will definitely comment those statements out.

And thanks for the help - problem solved.