Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author sjaved

    (@sjaved)

    Hi,

    Are you using widget or shortcode ? Can you please post the link of your site page where you added the plugin widget or shortcode.

    Thanks

    Plugin Author sjaved

    (@sjaved)

    resolved!

    Looks like I found a bug in your free version. The “Check new posts after every:” option in your widget does not work. This cache actually never expires. Gone through the code and traced the faulty code:

    File: public/views/feed.php

    Code to review: line 32 – 36
    ————
    if($cache_unit == ‘minutes’) $cache_unit = 60;
    if($cache_unit == ‘hours’) $cache_unit = 60*60;
    if($cache_unit == ‘days’) $cache_unit = 60*60*24;
    $cache_seconds = $cache_duration * $cache_unit;
    ————

    When user saves widget settings, you are saving the Unit value in $cache_duration and the Duration is saved in the $cache_unit.

    As a result the code above is always returning 0 as the transient lifetime and caching the feed for lifetime and not updating it.

    Hope you will have a fix very soon and give us an update.

    Has this been resolved? I’d been scratching my head for weeks as to why the Facebook feed was not updating and sticking on the post when I first applied the widget.

    Please let me know potential update time as it would be nice to have the feed active ??

    @imranulh:

    Good catch! I had informed the plugin author that the cache was not getting wiped (and created a workaround cron job to wipe the cache manually), but hadn’t determined the cause.

    I’ve modified the feed.php file on my site (rather than modifying the widget code) and will confirm your discovery.

    Of course, the proper solution would be to modify the widget code and leave the feed.php file as it was.

    The changes made to the feed.php file did fix the issue. And, as stated previously, the proper fix would be to alter the widget code. But, altering the widget code carries some issues of its own. Everyone who already used the “broken” version has their database loaded with the “wrong” information, so the process of updating the plugin would need to check whether the database was “correctly” or “incorrectly” configured at the time of applying the patch; and would either swap the fields or leave them as they are.

    @jefromcanada:

    Can you share your code change with us?

    So I can update my website, because it is very disturbing that the site is not updating with the latest facebook news.

    Regards,

    @ydkmaa

    Changing code is something that should only be done by someone who knows what they are doing. If you make a mistake, you can break your site. I am not the author of this plugin, and it was imranulh that found the fix. I will not be responsible for any damage caused by anyone using this fix.

    In the file “/wp-content/plugins/easy-facebook-likebox/public/views/feed.php”

    replace the lines:

    if($cache_unit == ‘minutes’) $cache_unit = 60;
    if($cache_unit == ‘hours’) $cache_unit = 60*60;
    if($cache_unit == ‘days’) $cache_unit = 60*60*24;

    with:

    if($cache_duration == ‘minutes’) $cache_duration = 60;
    if($cache_duration == ‘hours’) $cache_duration = 60*60;
    if($cache_duration == ‘days’) $cache_duration = 60*60*24;

    DISCLAIMER:

    This is a temporary fix until the plugin author fixes the underlying problem. If the plugin author issues a patch that does NOT make changes to the feed.php file (because there is technically nothing wrong with this file – the fault lies elsewhere), then this “fix” will actually end up breaking the plugin. You use this patch at your own risk.

    I have replaced the code in the file feed.php but not update data =(

    Patch is not working on my site too. Can anyone else help?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘plugin not working’ is closed to new replies.