WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Error manually placing AddToAny: Subscribe in sidebar

[Resolved] Error manually placing AddToAny: Subscribe in sidebar

  • I am trying to manually place the AddToAny:Subscribe widget manually on my page. I am using the code provided on the Settings -> Subscribe Buttons page:
    <?php if( class_exists('Add_to_Any_Subscribe_Widget') ) { Add_to_Any_Subscribe_Widget::display(); } ?>

    However, when the page is rendered I get the following errors:

    Warning: Missing argument 2 for Add_to_Any_Subscribe_Widget::display(), called in /home/tahsiafriedman/tahsiafriedman.com/tahsiablog/wp-content/themes/hope-child/sidebar.php on line 4 and defined in /home/tahsiafriedman/tahsiafriedman.com/tahsiablog/wp-content/plugins/add-to-any-subscribe/add-to-any-subscribe.php on line 53

    Fatal error: Call to undefined function widget() in /home/tahsiafriedman/tahsiafriedman.com/tahsiablog/wp-content/plugins/add-to-any-subscribe/add-to-any-subscribe.php on line 54

    The website is http://tahsiafriedman.com. However I have removed the code because it renders the website virtually unusable.

    Any ideas???

    P.S. – I’m new to the forums. Sorry if I’ve broken rules by replying to and editing my own posts.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m getting the same problem now that I have upgraded to the most recent version of Add to Any: Subscribe. I’ve had the plugin working properly in my site for some time, but when I used WordPress’ automatic update feature to bring it up to version .9.9.

    Lines 53 and 54 of wp-content/plugins/add-to-any-subscribe/add-to-any-subscribe.php are commented as handling “/** Backwards compatibility for Add_to_Any_Subscribe_Widget::display(); usage */”. It appears that in the latest update this backwards compatibility feature got broken. I suppose many people use the thing as a widget so they can have the ease of drag-and-drop to get it into their site, but I’m hoping the developers behind add-to-any will still permit us to just use the code snippet top pop it in wherever we want.

    Thanks PhynaeusClaw and gurustump for the reports!

    Fixed in the latest release, version .9.9.1.

    It is indeed fixed! Thank you!

    Hello,

    unfortunately, the issue is not fixed completely. If PHP 4.x is used, then the latest fix .9.9.1 results in a fatal error. For example: Fatal error: Undefined class name ‘self’ in /home/…/wp-content/plugins/add-to-any-subscribe/add-to-any-subscribe.php on line 54.

    This error is quite common and can be found for example here:
    http://ffynnonweb.com/
    http://hostalsalinas.com/wordpress/?p=191
    http://blog.cyclingo.com.au/

    Thanks for the correction,
    Marc

    Here’s the proper fix which works with PHP 4 as well:

    function display( $args = false ) {
      // replace this line: self::widget($args, NULL);
      Add_to_Any_Subscribe_Widget::widget($args, NULL);
    }

    Enjoy,
    Marc

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Error manually placing AddToAny: Subscribe in sidebar’ is closed to new replies.
Skip to toolbar