• Resolved zadine

    (@zadine)


    Plugin tries to load Featured Image field in Wp-admin. There’s no lazy-sizes script loaded in wp-admin so field shows empty.

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter zadine

    (@zadine)

    Thats strange, I only have netmedi/wordpress2/wp-admin/ on my browsers url..

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Yes, that sounds really strange. Could you try the following: Replace line 29 in the class-helpers.php with the following:

    $current_url = untrailingslashit( home_url() ) . $_SERVER['REQUEST_URI'];
    

    And test if this works? Have to go now, if it works, I will try to implement it tomorrow.

    Thanks in advance!
    Florian

    Thread Starter zadine

    (@zadine)

    No didn’t work, lazy-loading still tries to process featured images :/

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Okay, would have been to easy maybe… Could you remove the param add_query_arg( null, null ) from the homt_url() call in line 41 (inside the error_log() call) and post here what the result of home_url() is (inside the error log the value for $current_url =)?

    Thread Starter zadine

    (@zadine)

    [15-Sep-2017 13:16:03 UTC] PostThumbnailDebug: $current_url = https://client.rae.fi/netmedi/wordpress2 |	$admin_url = https://client.rae.fi/netmedi/wordpress2/wp-admin/ | $referrer = https://client.rae.fi/netmedi/wordpress2/wp-admin/edit.php
    [15-Sep-2017 13:16:03 UTC] PostThumbnailDebug: 0 === strpos( $current_url, $admin_url ) is NOT true. is_admin_request() returns false
    
    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Great, that means home_url() returns the correct value. Would you post me the output from this version? https://github.com/florianbrinkmann/lazy-loading-responsive-images/tree/debugging-post-thumbnail-issue

    Thanks!

    Thread Starter zadine

    (@zadine)

    [15-Sep-2017 16:27:35 UTC] PostThumbnailDebug: home_url( add_query_arg( [] ) ) = https://client.rae.fi/netmedi/wordpress2/netmedi/wordpress2/wp-admin/post.php?post=1697&action=edit |	add_query_arg( [] ) = /netmedi/wordpress2/wp-admin/post.php?post=1697&action=edit | home_url() = https://client.rae.fi/netmedi/wordpress2 | $admin_url = https://client.rae.fi/netmedi/wordpress2/wp-admin/
    [15-Sep-2017 16:27:35 UTC] PostThumbnailDebug: 0 === strpos( $current_url, $admin_url ) is NOT true. is_admin_request() returns false
    
    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    At first, thank you very much for your help with debugging it! ??

    I think I found the problem – the check fails for subdirectory installs. Would you give the latest version from the master branch a try? https://github.com/FlorianBrinkmann/lazy-loading-responsive-images/

    Thanks!

    Thread Starter zadine

    (@zadine)

    That seems to work! Thanks for helping me out, and thanks for the awesome plugin!

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Great to hear that! I just uploaded a new version 3.1.10 to the directory, which contains the fix.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Plugin trying to load Featured Image in Wp-dmin’ is closed to new replies.