WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[resolved] PHP Error: Undefined variable: button ... on line 448 (9 posts)

  1. Courtney Fantinato
    Member
    Posted 9 months ago #

    Hello,

    I am using the PHP from this tutorial (http://www.jacobtomlinson.co.uk/2013/03/17/using-the-addthis-share-buttons-wordpress-plugin-in-a-custom-theme/) so I can place the share buttons where I want in my template.

    However, the share buttons are not showing up and when I turn on WP debugging I get this error:

    Notice: Undefined variable: button in .../plugins/addthis/addthis_social_widget.php on line 448

    Can this PHP error in the plugin be fixed in an update please? I am using the latest version of the plugin (3.5.3).

    Thanks!

    http://wordpress.org/plugins/addthis/

  2. Courtney Fantinato
    Member
    Posted 9 months ago #

    Hello,

    I just updated the plugin to 3.5.4 and can confirm that the following error from the plugin is still appearing:

    Notice: Undefined variable: button in .../plugins/addthis/addthis_social_widget.php on line 448

  3. Courtney Fantinato
    Member
    Posted 9 months ago #

    So I am having to revert back to 3.5.1, as that version seems to work.

    I believe this issue is the same thing: http://wordpress.org/support/topic/build-your-own-social-media-buttons-not-appearing-at-the-bottom-of-posts?replies=3

  4. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 9 months ago #

    @Courtney: Yes, it's the same issue and we are working out a fix for it. Keep checking that thread, and we will share a beta version of the plugin with the fix there.

  5. Courtney Fantinato
    Member
    Posted 7 months ago #

    Hi srijith.v,

    I have just updated to 3.5.6 and this issue, reported over a month ago, is still a problem.

    When will a fix be released? I am stuck at 3.5.1 and to be at 3.5.6 without a resolution is very very disappointing.

    Thanks

  6. Courtney Fantinato
    Member
    Posted 7 months ago #

    Two months now, is there any resolution to this?

    Considering looking at other options at this point...

  7. Courtney Fantinato
    Member
    Posted 6 months ago #

    @srijith.v

    I am still getting this same PHP error after upgrading from 3.5.1 to the latest, 3.5.9:

    Notice: Undefined variable: button in .../plugins/addthis/addthis_social_widget.php on line 447

    It shows up on the front-end in place of the social icons.

    Any help here?

  8. Courtney Fantinato
    Member
    Posted 6 months ago #

    Comparing to version 3.5.1, the variable $button is inside of an IF statement that doesn't exist in 3.5.1:

    if (isset($options['type']) && $options['type'] != 'custom_string') { ... }

    Is there a NEW option for the array in do_action( 'addthis_widget', get_permalink(), get_the_title(), array(...)); ???

    ETA: Simply adding type => 'custom' to the array stops the error. It also works empty. Looks like the article I linked to above was also updated for this.

  9. Courtney Fantinato
    Member
    Posted 6 months ago #

    I'm going to mark this as resolved...

Reply

You must log in to post.

About this Plugin

About this Topic