• Resolved SamX

    (@techlector)


    Your plugin works magically on my other sites with lesser images. But on one of my sites with about 46,000 images, I keep getting “reply sent by the server is broken”.

    Here is the debug error:

    [12-Aug-2022 12:13:30 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/home/***arch.com/wp-includes/class-wp-query.php on line 4338

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    It’s very strange you are getting this error, it’s the first time I see it. And there is no way to say it is coming from Media Cleaner or another plugin, everything is possible at this point :/

    That said, it’s a Notice, so it shouldn’t break the asynchronous requests. Could you disable the PHP Notice? Maybe you have this instance of PHP running in dev mode, and it breaks the requests even though it’s just a Notice.

    Thread Starter SamX

    (@techlector)

    I actually used this below code in my wp-config to trigger the error log:

    // WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    Also, could it be because there is a large number of images to work with?

    • This reply was modified 2 years, 7 months ago by SamX.
    Thread Starter SamX

    (@techlector)

    I decided to use the filesystem scan option using regex ( /^[0-9]{4}\/04/ for all April folders) due to a very large image storage to scan for unused images in posts and pages, but I usually get this error:
    https://prnt.sc/DBpyibfJE53I

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @techlector,

    I decided to use the filesystem scan option using regex ( /^[0-9]{4}\/04/ for all April folders) due to a very large image storage

    Using a regex will not limit the amount of files scanned, it will only limit the results. It’s a bit tricky to explain this, but basically, if I was to limitate the folders/files based on a regex for the scan, I would need to write a parser or regex to detect what kind of regex is this, and if it affects what is scanned, or the result of the scan.

    So if you do this for speed purposes, don’t do it ??

    About the error, I can only tell you what’s going on with your PHP Error Logs. This popup doesn’t indicate much unfortunately, it only means the server broke for a specific requests and that no error was returned publically. You need to check the logs, it’s definitely there ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reply sent by the server is broken’ is closed to new replies.