• Resolved sharmander11

    (@sharmander11)


    When I have Ewww Image Optimizer activated along with WooCommerce. I experience this error when purchasing a product on my site. It happens in the final stage when I click “place order.” This is the error at the top of the page:

    SyntaxError: Unexpected token < in JSON at position 0

    I tried deactivating all my pluggins one at a time to try and figure out if another pluggin was causing the issue and this only happened with Ewww.

    Any thoughts on why this is happening would be great! I’m a big fan of Ewww Image Optimizer and would hate to not be able to use it!

    Site link: https://staging.wgmarketingtest.com/

    https://www.ads-software.com/plugins/ewww-image-optimizer/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    If you don’t have it, install Firebug extension for Firefox, open the Firebug console, make sure it is logging AJAX requests. If you’re in the admin side of WP, you’ll be seeing periodic “heartbeat” requests.
    Then, do the same thing, and see what the ajax response is that causes problems. I suspect there is some error message being output, when WooCommerce is expecting a json response.

    Plugin Author nosilver4u

    (@nosilver4u)

    A second thought, are you using the Alt WebP option?

    Thread Starter sharmander11

    (@sharmander11)

    It looks like all of the ajax requests are coming back with a Green 200 ok mark (sorry I’m newer at this so my lingo might not be up to snuff).

    And no, I’m not using the WebP option.

    Thread Starter sharmander11

    (@sharmander11)

    Update:this is the error I got when I tried it again in firefox (not chrome like my initial post):

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, if you’re using Firebug, you can click the little plus symbol to expand the request, and see the actual response, that should shed some light on it.

    Thread Starter sharmander11

    (@sharmander11)

    Ok, so there are two URLs listed:
    https://staging.wgmarketingtest.com/checkout?wc-ajax=checkout
    https://staging.wgmarketingtest.com/checkout?wc-ajax=update_order_review

    The first one is where I see this error when I visit the URL and in the the HTML tab in Firebug. This URL has an HTML tab where the other has a JSON tab.

    Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 9558 bytes) in /hermes/walnaweb11a/b2221/mysitecom/wgmarketingstaging/wp-includes/class-phpmailer.php on line 3175

    Plugin Author nosilver4u

    (@nosilver4u)

    Wow, you need to increase your memory limit. I’m surprised WP isn’t doing it for you. It’ll usually bump it to 64MB automatically. I’ve had no trouble running EWWW with a 32MB limit before, but when you add in any other plugins (and I suspect WP Commerce isn’t the most lightweight of plugins), you’re going to need more than 40MB.

    Thread Starter sharmander11

    (@sharmander11)

    Excellent! Increased the memory limit to 256MB and everything is working now. I’m pretty new to WP so I really appreciate you helping me through this!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Compatibility with WooCommerce Issue’ is closed to new replies.