WordPress.org

Ready to get started?Download WordPress

Forums

Juiz Social Post Sharer
[resolved] Getting 500 Internal Error on some pages (7 posts)

  1. Chantal Coolsma
    Member
    Posted 1 year ago #

    A customer of mine has two sites in a WordPress network. After updating the plugin to the latest version, it started generating 500 Internal Server errors on pages/post with the social buttons on them. Other pages worked normally.

    I deactivated the plugin and now everything works okay. Below some of the errors I noticed in the Apache error log:

    [Mon May 13 13:28:51 2013] [warn] [client xx.xx.xx.xx] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /home/xxxx/domains/xxxx.com/public_html/wp-content/plugins/juiz-social-post-sharer/juiz-social-post-sharer.php on line 133
    [Mon May 13 13:31:39 2013] [warn] [client xx.xx.xx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    [Mon May 13 13:31:39 2013] [warn] [client xx.xx.xx.xx] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

    (domain info and IP addresses replaced by xxxx)

    http://wordpress.org/extend/plugins/juiz-social-post-sharer/

  2. Geoffrey
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Chantal,

    Thank you for your feedback.
    It seems to be an incompatibility with WordPress Network, I'll work on it.

    Thank you for the Apache error log, very useful ;)

    G.

  3. Chantal Coolsma
    Member
    Posted 1 year ago #

    Hi Geoffrey,

    If you need more entries from the error log, please let me know.

    Chantal

  4. jamesdodd
    Member
    Posted 1 year ago #

    I'm also getting this error, but only on the main site. sub sites are working absolutely fine. haven't really had a chance to check out the code to see if I could work out the issue tho.

  5. jamesdodd
    Member
    Posted 1 year ago #

    ok. disabled pinterest and it started working again, no more errors (double checked it and it seems to be the issue).

    For now I'm fine with just disabling pinterest

  6. jamesdodd
    Member
    Posted 1 year ago #

    ok. the issue seems to be that on the pinterest button you're pulling in the excerpt via the: get_the_excerpt function.

    as the plugin's action is attached to the the_excerpt which in turn calls the get_the_excerpt function it just runs an endless loop.

    I made a quick fix here by changing the line 162 from:

    $api_link = 'http://pinterest.com/pin/create/bookmarklet/?media='.$image[0].'&url='.$url.'&title='.get_the_title().'&description='.get_the_excerpt();

    to:

    $api_link = 'http://pinterest.com/pin/create/bookmarklet/?media='.$image[0].'&url='.$url.'&title='.get_the_title().'&description='.$post->post_excerpt;

    as you've already pulled in the $post variable as a global in the function this should be a bit faster too (can't think of a reason not to use the variable).

    In my opinion adding the buttons to excerpts should be option and be triggered in the dashboard and disabled by default

    If anyone else wants to disable it on excerpts comment out (add // to) line 236

  7. Geoffrey
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you james, it's exactly the source of the issue.
    Sorry for the noob error =_=,
    Plugin updated !

    For your suggestion, you can easily (I hope) use plugin settings, hooks and template function to customize where your buttons are displayed.

    Have a nice day.
    G.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic