• I have installed the subscribe2 plugin. Everything seems to work except i am getting this message when someone clicks on the subscribe form on the page I created with the subscribe2 token. Any ideas?

    http://www.troop170macon.org

    Fatal error: Cannot redeclare class subscribe2 in D:\www\t\r\troop170macon.org\www\wp-content\plugins\subscribe2\subscribe2.php on line 52

Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you solve this?

    This error may be due to your host using windows (something I read on the plugin authors comments page).

    I get this kind of error when using xamp (for testing WP) on my windows pc

    Hi,

    I’ve been ‘playing’ with this plugin for the whole day and think I found some extra info + a workaround to issue mentioned above.

    It’s been happening the same to me when I’m logged in and the Subscribe2 page shows me a link to my profile. If I click on this link I get into admin/users/subscripcions and the ‘Cannot redeclare class…’ comes up.

    Reading in forums it seems to be it has something to do with Windows server. I’m not that sure of it but I can’t totally disagree for I’m running my testing server (Apache) under Windows.

    It has nothing to do with the Subscribe2 version as suggested in the same forums, for I have the latest version at the moment of writing: 2.2.4

    After some time reading the plugin code up and down, and double ckecking the links in the pages I found a weird (?, maybe not that strange) way of linking to the ‘User subscription settings’. Then I did 2 changes: one to the way the admin submenu ‘Subscriptions’ linked that page and a second one to the link that appears in the ‘subscription (public) page’ if the visitor is logged in (as a WordPress user), and the problem dissapeared. Colateral killings? I haven’t found one so far.

    The changes:

    1.- at around line 71
    $this->use_profile = __('You may manage your subscription options from ', 'subscribe2') . "your profile.";

    2.- at around line 118
    add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read",basename(__FILE__), array(&$this, 'user_menu'));

    Good luck and have a good day,
    hip – http://www.4tres.com

    I fixed a similar problem with my IIS install.
    I noticed there was a slight difference in the way the auto-generated link to the profile subpage was different from the way it was written when I clicked on the tab in the profile section of the dashboard. One was written with a backslash, while the other was written with a forward slash. I tracked it down to around line 64. I had to change:

    $this->use_profile = "" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href="" . get_settings('siteurl') . "/wp-admin/profile.php?page=subscribe2/subscribe2.php">profile</a>.
    "

    to:

    $this->use_profile = "" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href="" . get_settings('siteurl') . "/wp-admin/profile.php?page=subscribe2subscribe2.php">profile</a>.
    "

    EDIT:
    huh – there should be a backslash between between “subscribe2” and “subscribe2.php” in the last edited code, but for some reason the forum is stripping it out…

    That seemed to do it for me in Subscribe2 v2.2.8


    $this->use_profile = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "profile.</p\>";

    Worked for me.

    All with IIS and receiving this error. Could you guys test a more permanent fix see http://dev.wp-plugins.org/ticket/514#preview ?

    hey ruckerz – I can confirm that this does indeed seem to fix the problem. all looks like it is working as it should.

    Thanks for that!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Subscription Form’ is closed to new replies.