• Resolved anordby76

    (@anordby76)


    Hello,

    I have an issue with this plugin suddenly being deactivated suddenly so that share buttons disappear. I don’t know how or why this happens. If I manually activate the plugin again it works fine again. But I would prefer not to have to do this every now and then, I want the plugin to run at all times.

    Anyone else had this issue?

    https://www.ads-software.com/plugins/nextgen-facebook/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    Lol! I can see how that can get a little annoying and frustrating! ??

    I haven’t seen this before, except when the plugin folder is missing — if WP can’t find the plugin, it deactivates it.

    I’d suggest defining the following in your wp-config.php, and hopefully next time it happens, you’ll have somekind of related error message in WP’s debug.log file.

    define('WP_DEBUG', true);
    if ( defined('WP_DEBUG') ) {
            define('WP_DEBUG_LOG', true);
            define('WP_DEBUG_DISPLAY', false);
            @ini_set('display_errors',0);
    }

    Let me know what you find — I’m interested in knowing why this happens, and perhaps if I can code around it.

    Thanks,

    js.

    Thread Starter anordby76

    (@anordby76)

    Allright, I am trying that now. Perhaps the log will grow huge, as it takes a few days before it happens. I’m running the free version of nextgen-facebook by the way. Also I am running on a shared hosting at a popular web hosting provider here in Norway.

    Plugin Author JS Morisset

    (@jsmoriss)

    Well, hopefully it won’t be *huge* — WordPress should *only* log errors. You should *not* see *any* errors for wp-content/plugins/nextgen-facebook/, though you might see some (ahem) for other plugins and themes. ??

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    It’s been a week without any update, so I will change the issue to resolved. If the problem re-appears, let me know and we can look at it again.

    Thanks,

    js.

    Thread Starter anordby76

    (@anordby76)

    Hi. It happend again. All that I can find mentioned in debug.log mentioning nextgen including other warnings (I exclude notices because there are lots):

    [21-Aug-2013 01:00:01] PHP Warning: mysql_connect() [function.mysql-connect]: Host ‘goodwood.domeneshop.no’ is not allowed to connect to this MySQL server in /home/3/r/rights/www/wp-includes/wp-db.php on line 1142
    [21-Aug-2013 03:53:40] PHP Warning: htmlentities() [function.htmlentities]: Invalid multibyte sequence in argument in /home/3/r/rights/www/wp-content/plugins/nextgen-facebook/lib/head.php on line 154
    [21-Aug-2013 07:56:28] PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/3/r/rights/www/wp-content/plugins/disqus-comment-system/disqus.php on line 285 and defined in /home/3/r/rights/www/wp-includes/wp-db.php on line 992
    [21-Aug-2013 07:56:28] PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/3/r/rights/www/wp-content/plugins/disqus-comment-system/disqus.php on line 285 and defined in /home/3/r/rights/www/wp-includes/wp-db.php on line 992
    [21-Aug-2013 09:20:38] PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/3/r/rights/www/wp-content/plugins/disqus-comment-system/disqus.php on line 285 and defined in /home/3/r/rights/www/wp-includes/wp-db.php on line 992

    I don’t know if that helps you figure out why the plugin gets deactivated by itself?

    Plugin Author JS Morisset

    (@jsmoriss)

    Which version are you using? And Free or Pro?

    Thanks,

    js.

    Thread Starter anordby76

    (@anordby76)

    I am using free version like I wrote above. I was running version 6.5 when this happend now. Since then I upgraded to the latest, 6.7.5. But I suspect it will not help, as all versions has had this problem for half a year or so.

    Anyhow. One point is that my docroot is hosted on an NFS server. And it can happend that it is difficult to read files, I just noticed there was a stale NFS error. Could that make the plugin deactivate itself? I would prefer to control this behaviour myself so that it does not get deactivated.

    Plugin Author JS Morisset

    (@jsmoriss)

    Yeah, that *might* do it. In some instances, WordPress will deactivate a plugin if it encounters an error, and NGFB Open Graph+ uses a cache folder, so read/write errors *might* cause WordPress to deactivate the plugin. This would also happen to any other plugin that uses a cache folder.

    With all access to read/write from files, NGFB Open Graph+ checks if the fopen() command was successful, and even uses the @open() syntax to prevent error messages on failure. So, as I said, it *might* be possible, but perhaps unlikely. Though I don’t really see any other reason for WordPress to deactivate a plugin automatically.

    js.

    Thread Starter anordby76

    (@anordby76)

    Could it be the version check in lib/admin.php? It seems to be the only place where you automatically deactivate the plugin. Could you add a config variable to override this check?

    Plugin Author JS Morisset

    (@jsmoriss)

    That would be rather unlikely. The function is only run from the admin interface, and WordPress itself would have to return a version number less than 3.0.

    I’ve never heard of this happening on any other website (and I run several myself on a variety of platforms / providers), so although I can’t be 100% positive, I’m fairly confident that it would be related to something specific to your infrastructure.

    In version 6.7.3 I added the NGFB_CACHEDIR and NGFB_CACHEURL constants. If you want to move the cache directory locally on the server, you can define these constants. If the directory lies outside of the webserver’s docroot, you’ll have to create an alias to the directory. Make sure both constants are terminated with a slash.

    js.

    Thread Starter anordby76

    (@anordby76)

    Hmm I don’t have any access to the local filesystem except for shared filesystems like /tmp, /var/tmp etc. :-/

    I made a workaround (cron script) that automatically inserts nextgen-facebook to DB table wp_options active_plugins option if it goes missing. Sigh. Ugly but better than me having to quickly find a computer when it does not suit me.

    By the way: on this particular site I use 14 plugins, and I *only* have this issue with nextgen-facebook plugin:

    advanced-excerpt/advanced-excerpt.php
    disqus-comment-system/disqus.php
    feedburner-form/feedburner-form.php
    google-analytics-for-wordpress/googleanalytics.php
    google-sitemap-generator/sitemap.php
    hungryfeed/hungryfeed.php
    jetpack/jetpack.php
    login-lockdown/loginlockdown.php
    nextgen-facebook/nextgen-facebook.php
    quick-cache/quick-cache.php
    rss-import/rssimport.php
    secure-wordpress/secure-wordpress.php
    smart-archives-reloaded/smart-archives-reloaded.php
    wp-rss-multi-importer/wp-rss-multi-importer.php

    Plugin Author JS Morisset

    (@jsmoriss)

    I’m willing to help in any way I can, but the only way to know what’s causing the issue is to get the error from PHP / WordPress when the plugin is deactivated. By setting WP_DEBUG to true, and cleaning out the debug.log file daily, when the plugin is deactivated you can let me know the error message and line number. With the line number, and the plugin version, I can have a look and perhaps increase some error checks in the code at that location.

    You might also check the version of PHP you’re using — more recent versions of PHP v5.4.x for example, will have fewer bugs. I use 5.4.17, but I know 5.4.19 is available now (just waiting for my distro to catch up). ??

    js.

    Thread Starter anordby76

    (@anordby76)

    Regarding PHP I am using version 5.3.3-7 (Debian Squeeze). WordPress version is 3.6, and I am using the latest version of nextgen-facebook, 6.7.3. I can only upgrade WordPress and plugins. I asked about PHP upgrade, but it is shared hosting so I am not sure if they will do it any time soon.

    As this is a problem I had for some time, debug.log has been turned on for a while. Today nextgen-facebook got deactivated like it happend before (and my cron script reactivated it immiediately). But the only debug.log message from nextgen-facebook is:

    [02-Sep-2013 07:42:10] PHP Notice: Trying to get property of non-object in /home/3/r/rights/www/wp-content/plugins/nextgen-facebook/lib/webpage.php on line 224
    [02-Sep-2013 07:42:10] PHP Notice: Trying to get property of non-object in /home/3/r/rights/www/wp-content/plugins/nextgen-facebook/lib/webpage.php on line 226
    [02-Sep-2013 07:42:10] PHP Notice: Trying to get property of non-object in /home/3/r/rights/www/wp-content/plugins/nextgen-facebook/lib/webpage.php on line 224
    [02-Sep-2013 07:42:10] PHP Notice: Trying to get property of non-object in /home/3/r/rights/www/wp-content/plugins/nextgen-facebook/lib/webpage.php on line 226

    And the only message not being a notice is:

    [02-Sep-2013 16:25:47] PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/3/r/rights/www/wp-content/plugins/disqus-comment-system/disqus.php on line 285 and defined in /home/3/r/rights/www/wp-includes/wp-db.php on line 992

    Plugin Author JS Morisset

    (@jsmoriss)

    Excellent! Yes, I can see how a notice would be generated for author index pages without any posts. I’ve modified the code to use the supplied author from WP instead of using the author from the first post.

    Thanks for reporting this error — I like to keep the debug log clean for NGFB. ??

    You can find the latest version (6.7.4-dev1) here:

    https://downloads.www.ads-software.com/plugin/nextgen-facebook.zip

    js.

    Thread Starter anordby76

    (@anordby76)

    Ok I installed nextgen-facebook version 6.7.4-dev3. But would it help for my issue with the plugin getting deactivated? Or should I get more debug output the next time it happens?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Plugin getting deactivated suddenly’ is closed to new replies.