Upgrading BlogEngine.NET from 1.4 to 1.4.5.x

September 3, 2008 at 8:31 PMAndre Loker

About two month ago I wrote about small issues I faced when I upgraded from BlogEngine.NET 1.3.1 to version 1.4. Today I updated my blog software again, this time to the trunk version of BlogEngine.NET. Almost everything went smoothly there were a few glitches I had to fix before I was satisfied with the results.

Here are the most important points: 

  • First of all, the issues with the strange author name in the RSS feed (mail.nospam@nospam.andreloker.de) has been taken care of in version Nice! Note that the official 1.4.5 release from august 1st does not yet fix the issue. You'll need a revision 16044 or higher.
  • The strange e-mail fields (second point in my first post) are not really fixed - as far as "fixed" is the correct term - according to Mads Kristensen this was attentional. Mads has changed the behaviour a bit, however to the worse if you ask me. As mentioned in my first post if someone contacts you with the contact form you'd get an e-mail with your name and your email address as the "From" field. "Sender" and "Reply-To" headers are added which include the author's name and e-mail address. I mentioned some issues that are caused by this, for example that Thunderbird uses the "From" field when quoting a mail ("Andre Loker wrote:")
    Now it has changed slightly: the "From" field contains the name of the mail's author but the e-mail address of your blog. While this fixes the issue when quoting the mail it causes a worse issue: if you try to add the author to your address book, chances are that your mail application uses the author's name but your e-mail address. I created an issue for this bug - at least I think it should be considered a bug.
    To sanitize the situation I modified the code to create one reasonable "from" header and don't add any further headers to the mail:
       1: // Contact.aspx.cs - replace this:
       2: mail.From = new MailAddress(BlogSettings.Instance.Email, name);
       3: mail.ReplyTo = new MailAddress(email, name);
       4: mail.Sender = mail.ReplyTo;
       6: // with:
       7: mail.From = new MailAddress(email, name);
  • The current version of the contact form behaves a bit odd or doesn't work at all if attachments are disabled in the contact form, as it is in my blog. The issue is known, so we can expect a fix in the future. As a preliminary fix you can change contact.aspx like this:
       1: // line 48ff:
       2: // replace:
       3: if ($('<%=txtAttachment.ClientID%>').value.length > 0)
       4:   return true;
       6: //with
       7: <% if(BlogSettings.Instance.EnableContactAttachments) {%>
       8: if ($('<%=txtAttachment.ClientID%>').value.length > 0)
       9:   return true;
      10: <%}%>

Aside from these issues the people behind BlogEngine.NET have done a great task to improve their product.  I wholeheartedly recommend it to anyone asking for .NET based blogging software.

Posted in: ASP.NET | Meta

Tags: ,