• Resolved kathycb

    (@kathycb)


    I’ve updated to WordPress 4.3 and now am seeing the following error message on my pages —
    Warning: Invalid argument supplied for foreach() in …../plugins/printfriendly/pf.php on line 170

    Line 170 contains this code:

    function is_main_query_loop(){

    and there’s the whole ‘block’ in that area:

    /**
      * Returns true if the content displayed by main WP query
      * @since 3.4.1
      *
      **/
      function is_main_query_loop(){
        $is_main_query_loop = false;
        foreach ($GLOBALS['wp_the_query']->posts as $query_post) {
          if($query_post->ID == get_the_ID() ){
            $is_main_query_loop = true;
            break;
          }
        }
        return $is_main_query_loop;
      }

    Appreciate any help, thanks!!

    https://www.ads-software.com/plugins/printfriendly/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Same issue here. The upgrade produces the error.

    Getting the same error. Just saw it today so it happened between today and last week.

    Please help.

    Using 4.3 as well.

    Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Hi there,

    Sorry to hear of the problem you are having.

    Could you please try using the latest released Print Friendly and PDF Button plugin version 3.4.2 and let us know how it works for you?

    Best Regards,
    Print Friendly Team

    Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Hi there,

    Could you please share me the page URL from your site where you are getting this Warning message so that i can troubleshoot it?

    Kind Regards,
    Print Friendly Team

    Thread Starter kathycb

    (@kathycb)

    Thanks for your advise/help — I updated the plugin and it is working fine now. I usually wait a few days after a new WP version is released to give plugin apps time to get updated…..and jumped the gun this time!

    Thanks again!

    The error was occurring for me on the admin page for another plugin (LayerSlider), but it’s gone now. Not sure what the issue was, but all good now…and I did nothing. I’ll let you know if it happens again.

    Thanks for responding.

    NOTE: I actually have version 3.4.3

    Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Hi @kathycb, @tinatheva1,

    Thank you for your replies here.

    Could you please share me the list of plugins that you are using on your site so that i can reproduce the issue on my test site and fix it completely?

    Your replies as help here is really appreciated.

    Regards,
    Print Friendly Team

    The last update fixed the problem for me.

    Thread Starter kathycb

    (@kathycb)

    Sure…but there’s alot of them (sorry!)

    Anything Popup Version 5.8 | By Gopi Ramasamy
    DuplicatorVersion 0.5.28 | By LifeInTheGrid
    Improved Include Page Version 0.5.0 | By Vito Tardia
    iThemes Security Version 4.9.0 | By iThemes.com
    Post Expirator Version 2.1.4 | By Aaron Axelsen |
    Print Friendly and PDF Version 3.4.3 | By Print Friendly |
    Quform Version 1.5.0 | By ThemeCatcher
    Redirection Version 2.3.16 | By John Godley |
    Revolution Slider Version 4.6.0 | By ThemePunch
    Testimonials Widget Version 3.2.0 | By Axelerant
    The Training Classes Calendar Version 3.11.2 | By Modern Tribe, Inc. |
    Timed Content Version 1.2.1 | By David Artiss |
    U-Design WooCommerce Integration Version 1.0.1 | By Andon
    WooCommerce Version 2.4.5 | By WooThemes
    WooCommerce Checkout Manager Version 3.6.8 | By Ephrain Marchan
    WooCommerce Customer/Order CSV Export ersion 3.9.1 | By SkyVerge |
    WooCommerce Grid / List toggle Version 1.0.0 | By jameskoster
    WooCommerce Menu Cart Version 2.5.7 | By Jeremiah Prummer, Ewout Fernhout
    WooCommerce Product Details Customiser Version 0.2.0 | By jameskoster
    WooSide
    bars Version 1.4.2 | By WooThemes |

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Update to WP 4.3 caused error’ is closed to new replies.