• @roselldk Thank you for this plugin and your truly active development!

    I’ve tried to setup a cloud conversion, but ran into some trouble.
    I’ve updated everything to your latest release.

    My cloud conversion setup works great, when tested in shell.
    Within the plugin in WP, the remote service is flagged as “Operational”.

    When running the integrated testing, I’m getting an error.
    Essentially the remote server is being served with an object instead of an array.
    No matter what settings I choose, I’m getting the same error.

    Result: Failure
    
    Message: Unexpected result. We did not receive an image but something else.
    
    Conversion log:
    
    Converter set to: wpc
    
    *WebP Convert 2.1.1*  ignited.
    - PHP version: 7.0.33
    - Server software: Apache
    
    Wpc converter ignited

    […]

    Quality of source is 93. This is higher than max-quality, so using max-quality instead (80)
    Bummer, we did not receive an image
    What we received starts with: "Conversion failed!The "png" option must be a array (you provided a object)..."
    
    **Error: ** **Unexpected result. We did not receive an image but something else.**

    Your help would be greatly appreciated! Thanks in advance!

    • This topic was modified 6 years, 11 months ago by deuf9912.
    • This topic was modified 6 years, 11 months ago by deuf9912.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rosell.dk

    (@roselldk)

    Ok, so the error message says that the “png” is send as an object instead of an array.

    I’m having trouble reproducing this.

    In plugins/webp-express/vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php, you can try to insert a line that logs exactly what options that webp-convert receives:

    After line 121, which says “$this->logLn(‘ ignited.’);”, try inserting this line:

    
    $this->logLn(print_r($options, true));
    

    You should then see it in the conversion log (there are logs for each conversion in wp-content/webp-express/log/conversions/)

    Does it also fail when you click “test” next to a converter? – then you should see it there.
    Can you tell me what gets logged?

    PS: I unfortunately only have very little time today before I’m leaving for vacation

    • This reply was modified 6 years, 11 months ago by rosell.dk.
    Plugin Author rosell.dk

    (@roselldk)

    I searched for json_decode calls, and it seems I forgot to set the second param to “true” in one relevant place.

    Try changing line 115 in plugins/webp-express/vendor/rosell-dk/webp-convert-cloud-service/src/Serve.php from this:

    $convertOptionsInPost = (array) json_decode($_POST['options'])

    to this:

    
    $convertOptionsInPost = (array) json_decode($_POST['options'], true);
    
    • This reply was modified 6 years, 11 months ago by rosell.dk.
    • This reply was modified 6 years, 11 months ago by rosell.dk.
    • This reply was modified 6 years, 11 months ago by rosell.dk.
    Plugin Author rosell.dk

    (@roselldk)

    I’m guessing that this was the problem and just released 0.14.21, which hopefully fixes this. Over and out. Talk to you in ~4 weeks

    Thread Starter deuf9912

    (@deuf9912)

    @roselldk Huge thanks for your dedication towards this issue! I’m currently out of office. I’ll try it out first thing tomorrow and will post my results.
    Hope you’ll have a great vacation!

    Plugin Author rosell.dk

    (@roselldk)

    Hi again, @deuf9912.
    I’m back from vacation. Did it work?

    Thread Starter deuf9912

    (@deuf9912)

    Hi Rosell,
    yes it worked and still works great! Can’t thank you enough!
    Sorry for the late reply!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Remote WebP Express Error / Object instead of array’ is closed to new replies.