Support » Plugin: WP Media folders » Queue not executing locally, even manually

  • Resolved anatman

    (@anatman)


    (creating new thread per dev request)

    PHP 7.2.9, WP 5.4, just updated the plugin to this latest version you uploaded with the debug logging. Running the local site on a “Local by Flywheel” instalation, nginx and MySQL 5.7.23.
    I had migrated my site from a server on UTC-3 to a local instalation which is at UTC-4, and had kept the old setting. Now i have set the local installation to UTC-4.

    The manual fix does not work, i still have the file in the queue. When i visit the manual fix page, a single “0” is printed on the white page, but twhen i go back to the dashboard, the file is still waiting in the queue. The debug log shows 2 lines repeating, and it keeps increasing in size with those two same lines, they are:

    Info : Ajax queue proceed request (queue length: 1)
    Info : Proceed queue asynchronously

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter anatman

    (@anatman)

    Update, answering dev:

    Could you tell me in this new post if you have anything after these two lines?
    Something starting by Info : Synchronous queue finished or Info : Max execution time is

    No, i don’t have anything like that… just the two lines i informed in the original post, repeated over and over again, but now i noticed i have a few of these, sprinkled around:

    Info : Heartbeat received, queue length is 1

    Thank you very much for your help.

    Plugin Author dbarrere

    (@dbarrere)

    Thanks for the informations, unfortunately I need more debug than what I thought at first.

    Could you edit the file /wp-content/plugins/wp-media-folders/classes/queue.php line 60 and replace
    WP_Media_Folders_Debug::log('Info : Proceed queue asynchronously');
    by
    WP_Media_Folders_Debug::log('Info : Proceed queue asynchronously ' . print_r($result, true));

    And click on the the orange button in the admin bar.

    The debug file should be updated with more informations, please share it.

    Best regards

    Thread Starter anatman

    (@anatman)

    Ha!

    So – I’m running locally but using https://mysite.local. Looks like this is the problem, please take a look:

    Info : Ajax queue proceed request (queue length: 1)
    Info : Proceed queue asynchronously WP_Error Object
    (
        [errors] => Array
            (
                [http_request_failed] => Array
                    (
                        [0] => cURL error 60: SSL certificate problem: self signed certificate
                    )
    
            )
    
        [error_data] => Array
            (
            )
    
    )
    

    Any simple way to work around this? Or will i have to go back to https?

    • This reply was modified 2 years, 3 months ago by anatman.
    Plugin Author dbarrere

    (@dbarrere)

    Yes you’re right, it seems to be the problem.

    Please just change the line 59 in the same file to
    $result = wp_remote_head(admin_url('admin-ajax.php').'?action=wpmfs_proceed&wpmfs_token='.get_option('wp-media-folders-token'), array('sslverify' => false));

    It will prevent WordPress to do a ssl verification.
    It’s not a problem in our case as it’s a self call and this request do not send any information.
    I’ll update the code with this fix for the next version.

    Please let me know if it works as expected after this change.

    Best regards

    Thread Starter anatman

    (@anatman)

    Perfect, solved!
    Thank you so much for your time and effort.

    Plugin Author dbarrere

    (@dbarrere)

    That’s a good new!

    The next release with the fix should be available in the upcoming days.
    I’ll try to solved the other ticket first if it’s not related to the same thing.

    And thanks a lot for your review, I really appreciate it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Queue not executing locally, even manually’ is closed to new replies.