Support » Plugin: Subscribe2 » [Plugin: Subscribe2] Why is a Page needed?

  • I don’t really understand why this plugin needs a Page in order to work, and it’s been confusing for a few of our users now. Two questions:

    1) Any chance of removing the page requirement? It seems really… random.
    2) If not, the big red warning box that appears on the Subscribe2 Settings page should probably appear on ALL dashboard pages if the plugin doesn’t work correctly without a page. (Confirmation links in emails seem to 404, and people can’t confirm).

    Thanks! And S2 has been working better than ever with these last bunch of updates – thanks for all your work!

Viewing 4 replies - 1 through 4 (of 4 total)
  • @madtownlems,

    The page requirement is necessary to dynamically process the Subscribe2 output. The plugin produces a form, subscription confirmation, unsubscription confirmation, messages to log in or links to a registered users profile. All of these things need the page to exist in order to be displayed.

    This is confirmed by what you’ve seen when you don’t have a page and you get 404 error messages from the email links.

    I’ll have a think about a global error message but when page creating is detailed as part of the installation process it may be overkill for many users.


    I’ve been thinking about the global error message if no page is available. This would add a database query call to the load of all admin pages which could impact on the admin page load times for users of Subscribe2 using hosts who have oversold space on their servers.

    I think it unwise to add such a coding burden to every page when it could have such a broad and negative impact.

    I think that, in reality, a database call on Admin Pages is the tiniest of drops in the bucket in terms of performance, and the extra call is completely worth it.

    Right now, users can enable the plugin and set up the widget. If they then end up deleting their Sample Page, or whatever their only page is, they now have a website that is attempting to take signups, looks like it’s taking signups, but ultimately doesn’t work.

    However, it’s your plugin, so if you don’t think it’s worth it, that’s that. 🙂 I’ll likely write my own mu-plugin to do checking on our servers. Thanks – as usual – for your time and thoughts. Cheers!


    I’m not against the principle, I’m just wary of the extremely poor quality but free hosting that many people use to run their WordPress installs and then they are surprised when it all falls down when they add a few plugins.

    A custom plugin on your site should be pretty straightforward, something like:

    function s2_page_checker() {
    	// send error message if no WordPress page exists
    	global $wpdb;
    	$sql = "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status='publish' LIMIT 1";
    	$id = $wpdb->get_var($sql);
    	if ( empty($id) ) {
    		echo "<div id=\"message\" class=\"error\"><p><strong><p class=\"s2_error\">You must to create a WordPress page for this plugin to work correctly.</p></strong></p></div>";
    add_action('admin_notices', 's2_page_checker');

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Subscribe2] Why is a Page needed?’ is closed to new replies.