BE with SimpleBlog Newsletter not working

Jan 14, 2014 at 2:28 AM
Edited Jan 14, 2014 at 2:57 AM
I am unable to subscribe or unsubscribe to a Newsletter with SimpleBlog. Check it out here: on the bottom widget, thanks.

This was working with the Standard theme, I just spent a lot of time and work getting setup with SimpleBlog, I really hope that this issue has a fix, I would hate to give up the SimpleBlog theme and go backwards.

The Newsletter are sent out it is just the subscribing/unsubscribing issue that needs help.
Jan 14, 2014 at 11:50 AM
Edited Jan 14, 2014 at 11:51 AM
Can anyone help? This worked fine with the Standard theme, but not with SimpleBlog.
Jan 14, 2014 at 12:50 PM
Hi Jerry,

I went to have a look at your site, but it went off-line and then the newsletter widgets disappeared.
Not saying I could have fixed it, but would have given it a try.

The subscribe/unsubscribe works fine on a local copy I have of 2.9 with Simple Blog and the new Simple Blog theme, so looks like something else is conflicting.

I'm out for the day now, but if you put the widgets back I can have a look either later today or early tomorrow, or maybe someone else might be able to check before that, but the widgets will need to be in place.
Jan 14, 2014 at 12:51 PM
Thanks Andy, I'll reinstall them, I would like to upgrade to 2.9 but cannot get it working on the server.
Jan 14, 2014 at 3:49 PM
Hi Jerry,

Here's what I'm seeing:
Subscribe/unsubscribe works everywhere except pages "front" and any BE pages.
You can subscribe/unsubscribe from search, contact, individual post pages, browse by category, tag, date author etc.
On the BE pages it's a 404 not found error and on the front the more general 500.

What's going on with the front page, I take it you set some page as front?

You reckon this is happening only with this theme?
The problem is that I can't reproduce this locally with version 2.8, do you have a local clean copy of BE that you can check.
I'm not sure why this should be happening only on BE pages, might be some setting on the server, might be a corrupt file, hard to say.
First port of call, see what's happening locally, first with a fresh copy of BE and then with your content added.
Jan 14, 2014 at 4:20 PM
HI Andy, yes I have a page set at front page, the hiking club board wanted a page that doesn't look like a blog page, is a BE page though, doesn't it have to be a BE page to use the widgets?

I am not sure if it is only this theme, I will try it locally with another theme and the same front page.

Thanks for your help and I will get back to you.
Jan 14, 2014 at 4:26 PM

I tried it locally with the BE default page and the standard theme and it worked fine, when I set another BE page as the front page it did not work. Do you have any suggestions around this? Thanks.

Jan 14, 2014 at 5:43 PM
Edited Jan 14, 2014 at 5:43 PM

Same here, looks like a bug might have slipped in.
Surprise nobody noticed this before, just checked 2.6, 2.7 and 2.9 and it's there.
Knowing what's causing it is half the battle.
Might be quicker for BE team to have a look.
I'll also have a look, but won't be until tomorrow.
Jan 14, 2014 at 8:56 PM
Thanks Andy, maybe the BE team will have a look, if not I do appreciate your help, hopefully there is a fix.
Jan 14, 2014 at 9:37 PM
Hi Jerry,

This might need a little more fixing.
With BE page set as front and extensionless URL's set, you crash, don't try it.

Might well be something BE team need to look at, I just started poking around.
Right now I have a pressing engagement with Mr Budweiser, but for curiosities sake will have another look tomorrow.
Jan 14, 2014 at 9:50 PM
Thanks Andy, what's the trick to get the BE team to take a look at this?
Jan 15, 2014 at 1:15 PM

In the blog root, find page.aspx.cs and open it,
Look for the "OnInit" method and add a callback check to the else clause.
protected override void OnInit(EventArgs e)
        var queryString = this.Request.QueryString;
        var qsDeletePage = queryString["deletepage"];
        if (qsDeletePage != null && qsDeletePage.Length == 36)
            this.DeletePage(new Guid(qsDeletePage));

        Guid id = GetPageId();
        if (id != Guid.Empty)
            if (!this.IsCallback)

That should allow subscribe/unsubscribe to work everywhere excluding the front page.

I'm still getting to grips with that part but it will have to wait till later.
I think maybe the UrlRules might also need a check for BE page as default.

Coincidently, this has flagged up an oversight in some code I have where I should be checking for BE page as front.
Jan 16, 2014 at 1:58 AM
Edited Jan 16, 2014 at 9:19 AM
Andy, under admin/pages there is a page named pages.aspx.cs but not page.aspx.cs is this the right one.

Edit: Found it
Jan 16, 2014 at 9:03 AM
Edited Jan 16, 2014 at 9:22 AM
So the Newsletters work everywhere but the front page now, thanks Andy, hope you can figure out the last part.
Jan 16, 2014 at 10:23 AM
RTur posted fix in latest source code, so if you download that and replace "Post Notifications" newsletter widget folder in your 2.8 version with latest it should be good.
Keep the change you made to page.aspx.cs.
I'm not sure about your other newsletters with regard to any customisations you may have done, they may need modifying.
Jan 16, 2014 at 3:31 PM
Andy is there anyway that the Notifications can be made not visible from the front page?
Jan 16, 2014 at 3:56 PM
Andy I am concerned if I do the above my other 2 Notification Lists are still not going to work on the front page, is there a way to make a Notification List page I can link to and have all all of the lists on for sign up and unsubscribing?
Jan 16, 2014 at 10:37 PM
Yes, you can either send me your 3 widgets and I will apply changes(codeplex email), hide the widgets on the front page or as you suggest, have a signup page. If you decide to send the widgets, send also your stylesheet so the sign up buttons can be style matched.
Jan 16, 2014 at 11:30 PM
Which of the options do you like?

I think having a signup page would be a clean way, then they could be deleted from the bottom widget zone on all the pages. This would be a good idea if it would be a BE page and I could make Member Info page the parent then the link would be in the drop down menu on the top which I like. If we did the signup page i would still like the buttons to match.

What do you think?

Thank you.
Jan 17, 2014 at 3:43 PM
I have done this little workaround, it is not much elegant but I think that someone can use, util a better solution.

1st > You need to create a new webform page (not a blog page) named e.g. newsletter.aspx and newsletter.aspx.cs
2nd > In the newsletter.aspx copy and paste this code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="newsletter.aspx.cs" Inherits="newsletter" EnableViewState="false" Title="Newsletter" %>
<%@ Register Src="~/widgets/Newsletter/widget.ascx" TagPrefix="uc1" TagName="widget" %>
<asp:content id="Content1" contentplaceholderid="cphBody" runat="Server">
  <div class="page-global">
     <uc1:widget runat="server" ID="widget" />
3rd > In the newsletter.aspx.cs copy and paste this code
using System;
using System.Globalization;
using System.Web.UI;

using BlogEngine.Core;
using BlogEngine.Core.Web.Controls;
using Page = BlogEngine.Core.Page;

public partial class newsletter : BlogBasePage


4th > Add to the site.master of your theme, under navigation menu, this code
<li><a href="<%=Utils.AbsoluteWebRoot %>newsletter<%= BlogEngine.Core.BlogConfig.FileExtension %>">Newsletter</a></li>
5th > remove old newsletter widget to avoid conflict.

Have a nice day
Jan 18, 2014 at 4:21 PM
Great IlDrago also works perfectly in the theme razor alltuts... I did a test locally and your Newsletter save me email added...
I only need to test the inclusion of a new post and if you are notified with an email...