Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author macgamer

    (@macgamer)

    You’re getting a server error on trying to render the onebox, which is why it never appears.
    What version of PHP do you have?
    Do you have APC caching enabled in the onebox settings page?
    Does the example onebox appear in the onebox settings page?

    Here’s a version of the plugin with some extra error logging, can you try installing it, then visit this address and see what the error message is?

    Thread Starter rosina lippi

    (@greenery)

    Hi macgarner: You’re right, I don’t have either of the suggested extensions installed. It will take me a while to figure out how to do that, but I’ll work on it. Thanks for the quick reply.

    Plugin Author macgamer

    (@macgamer)

    I think all the suggested extensions are optional, and only add features for some websites. I suspect the issue you’re experiencing may be something else?

    Hey there,

    I’m not sure if I’m having the same issue as greenery, but I’m having something that at least sounds similar. I made a page with a onebox call here: https://navigatorxiv.com/test-page/

    Unfortunately, I need to turn off debug for the site because I’m lazy and do all my code edits without a dev site, but hopefully the information below is thorough enough to help suss out what’s going on.

    With debug mode disabled:
    The Onebox styling appears, but the text “No description available for this site” is displayed. A link to the site referenced is included. Screenshot: https://i.imgur.com/iu4iuwm.png

    With debug mode enabled:
    No box appears, only a link with the text “Link,” pointing out to the referenced site. Screenshot: https://i.imgur.com/mGX0T6o.png

    Error log can be found here, including a bit of history. Potentially unrelated stuff in there, but each set of timestamps roughly is associated with a separate pageload. Not sure what’s going on with the debug mode changing what I see, but if there’s any error reporting on the non-debug app, it should be visible in this log as well.

    [15-Aug-2014 16:32:58 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:32:58 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class reCAPTCHA in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/recaptcha.php on line 17
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  file_get_contents(https://github.com/surrealroad/wp-onebox): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 133
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  simplexml_import_dom(): Invalid Nodetype to import in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/favicon.php on line 25
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class reCAPTCHA in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/recaptcha.php on line 17
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  file_get_contents(https://github.com/surrealroad/wp-onebox): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 133
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 25
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 26
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 27
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 32
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/meta.php on line 21
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  simplexml_import_dom(): Invalid Nodetype to import in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/favicon.php on line 25

    edit: trimmed down the error log a little bit (removed repeated messages from unrelated plugins)

    Plugin Author macgamer

    (@macgamer)

    From your logs, it seems it might have something to do with your server host blocking access to other websites. Which hosting service do you use?

    If I can, I will try to find a workaround.

    Plugin Author macgamer

    (@macgamer)

    To anyone experiencing this issue, please download v1.0 or newer, (at the time of this post the v1.0 beta is available via this link: https://github.com/surrealroad/wp-onebox/archive/master.zip )

    Hey there,

    Sorry for the delayed response – I have installed your beta version, and I still seem to be experiencing the issue.

    My host provider is Lithium Hosting, and I have a shared hosting plan with them. I looked through their documentation on allowing changes to php.ini, and it looks like there’s limited access there, but allow_url_fopen cannot be changed.

    Let me know if there’s any other information I can provide.

    Plugin Author macgamer

    (@macgamer)

    Do you get any error messages if you go to the onebox settings page?

    In fact, I do!

    Notice: The allow_url_fopen property (for retrieving data from external websites) is disabled in your PHP configuration. Onebox will attempt to use an alternative method (in most cases this should not cause any problems).

    Plugin Author macgamer

    (@macgamer)

    Do you have APC caching enabled? If so, can you try turning it off?

    I do not have it enabled. If your next question is to ask me to try turning it on, I’m not actually sure how to do that with my host.

    Along with that notice, I do also get the two notices associated with not having GeoIP PHP and Alternative PHP Cache enabled. Should have been clear on that, my apologies.

    Plugin Author macgamer

    (@macgamer)

    No that’s fine, I’m just curious as to why you’d still be having problems with this beta version. Any chance you could generate another log for me?

    [18-Aug-2014 18:54:55 UTC] PHP Warning:  include(/home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php): failed to open stream: No such file or directory in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-onebox-master/onebox.php on line 212
    [18-Aug-2014 18:54:55 UTC] PHP Warning:  include(): Failed opening '/home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php' for inclusion (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-onebox-master/onebox.php on line 212

    ??

    So I just read the logs and realized what the issue was, so I uninstalled, unzipped the beta file and renamed the directory there from wp-onebox-master to onebox, then reinstalled, and it looks like the plugin is nearly working now!

    I’ll direct you back to my test page:
    https://navigatorxiv.com/test-page/

    And here’s the error log:

    [18-Aug-2014 20:04:04 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/xivdb.php on line 34
    [18-Aug-2014 20:04:04 UTC] PHP Warning:  file_get_contents(https://xivdb.com/modules/fpop/fpop.php?id=7351&lang=en&type=item&version=1.6): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/xivdb.php on line 34

    Looks like it’s still getting stuck on that point, though it’s finding some meta data to display at least?

    I am a little surprised with myself at having actually been able to fix this, but I have managed to do so, at least partially!

    The error in question is caused by a call to file_get_contents() in the xivdb.php parser. The path around it is to grab the contents of that URL via curl.

    So here’s the function I used to grab the contents:

    function get_content($URL){
    	    $ch = curl_init();
    	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    	    curl_setopt($ch, CURLOPT_URL, $URL);
    	    $data = curl_exec($ch);
    	    curl_close($ch);
    	    return $data;
    	}

    I placed this outside other functions in the xivdb.php parser file (spot patch!)

    Then in the get_xivdb_data function, i replaced the line calling file_get_contents() with a line calling the new function.

    New line:

    $info = json_decode(get_content("https://xivdb.com/modules/fpop/fpop.php?id=".$ID."&lang=".$lang."&type=".$type."&version=".$version), true);

    This may not be the most elegant fix, but hopefully it helps! Looking forward to future updates of this great plugin!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘just … not working’ is closed to new replies.