• On one of my client’s sites, she has a free item that when purchasing there is a notice that comes up:

    SyntaxError: Unexpected token C in JSON at position 0

    I tested an item and got that message, but the item still processed with an email and a link to the item. What would be causing this message? People can get their free item, but it looks bad to have this notice.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter David Borrink

    (@davidborrink)

    Actually, my client now reports that this message showed up on a paid product. So things are working and they get products but the message isn’t a good one to see and looks like an error.

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @davidborrink!

    That error indicates that something is outputting additional debug information before the AJAX data — and it’s usually caused by either your theme or another plugin.

    Official debug steps for this error can be found here: https://mikejolley.com/2015/11/12/debugging-unexpected-token-in-woocommerce-2-4/

    Cheers!

    Thread Starter David Borrink

    (@davidborrink)

    Okay, I ran the test and used the debugging window and found the wc-ajax-checkout message. It stated:

    Curl error: OpenSSL was built without SSLv3 support
    OpenSSL was built without SSLv3 support

    Is this more of a server issue? Could you advise me as to where I should head with this?

    Screen shot of my test: https://prnt.sc/wg1v14

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @davidborrink!

    What PHP version are you currently using?

    Could you please paste your sites’ status report back here so we can take a closer look? You’ll find that under “WooCommerce > Status” page.

    Cheers!

    Thread Starter David Borrink

    (@davidborrink)

    Sure. Here you go: This site is on PHP 7.4.11

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://thekennedyadventures.com
    Site address (URL): https://thekennedyadventures.com
    WC Version: 4.8.0
    REST API Version: ? 4.8.0
    WC Blocks Version: ? 3.8.1
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.7.3
    Log Directory Writable: ?
    WP Version: 5.6
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.11
    PHP Post Max Size: 832 MB
    PHP Time Limit: 14400
    PHP Max Input Vars: 1000
    cURL Version: 7.72.0
    OpenSSL/1.1.1h
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.3.17-MariaDB
    Max Upload Size: 32 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 4.8.0
    WC Database Prefix: wp_
    Total Database Size: 453.20MB
    Database Data Size: 349.49MB
    Database Index Size: 103.71MB
    wp_woocommerce_sessions: Data: 4.31MB + Index: 0.16MB + Engine MyISAM
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 2.52MB + Index: 4.86MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 1.52MB + Index: 0.23MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 5.52MB + Index: 6.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 6.02MB + Index: 1.28MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 1.52MB + Index: 0.80MB + Engine InnoDB
    wp_adrotate: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_adrotate_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_adrotate_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_adrotate_linkmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_adrotate_schedule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_adrotate_stats: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    wp_adrotate_tracker: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_amd_yrecipe_recipes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_avhec_category_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_bccr_log: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_bccr_replay: Data: 0.08MB + Index: 0.06MB + Engine MyISAM
    wp_blc_filters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_blc_instances: Data: 5.52MB + Index: 0.86MB + Engine InnoDB
    wp_blc_links: Data: 45.56MB + Index: 3.36MB + Engine InnoDB
    wp_blc_synch: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    wp_commentmeta: Data: 27.56MB + Index: 3.03MB + Engine InnoDB
    wp_comments: Data: 16.52MB + Index: 5.52MB + Engine InnoDB
    wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gf_entry: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gf_entry_meta: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
    wp_gf_entry_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gf_form_meta: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gf_form_view: Data: 0.47MB + Index: 0.33MB + Engine InnoDB
    wp_lasso_amazon_products: Data: 2.50MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_amazon_tracking_ids: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_lasso_category_order: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_clicks: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_clicks_meta: Data: 0.27MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_content: Data: 0.14MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_import_track: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_keyword_locations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_lasso_link_locations: Data: 8.05MB + Index: 2.16MB + Engine InnoDB
    wp_lasso_revert: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_shorten_url: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_lasso_suggestion_ignores: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_tracked_keywords: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_lasso_url_details: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_lasso_url_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_lasso_url_issue_definitions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_maxbuttons_buttons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_creations: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_mv_images: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_mv_nutrition: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mv_products: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_products_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_relations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_revisions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mv_settings: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    wp_mv_shapes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mv_supplies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_odb_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_options: Data: 4.42MB + Index: 0.23MB + Engine InnoDB
    wp_pmxe_exports: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_pmxe_google_cats: Data: 0.39MB + Index: 0.00MB + Engine InnoDB
    wp_pmxe_posts: Data: 0.03MB + Index: 0.02MB + Engine MyISAM
    wp_pmxe_templates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_postmeta: Data: 66.61MB + Index: 31.11MB + Engine InnoDB
    wp_posts: Data: 76.52MB + Index: 18.76MB + Engine MyISAM
    wp_prli_clicks: Data: 0.39MB + Index: 1.02MB + Engine InnoDB
    wp_prli_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_prli_links: Data: 0.02MB + Index: 0.20MB + Engine InnoDB
    wp_prli_link_metas: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_rg_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_rg_form_meta: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    wp_rg_form_view: Data: 0.42MB + Index: 0.30MB + Engine InnoDB
    wp_rg_incomplete_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_rg_lead: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_rg_lead_detail: Data: 0.16MB + Index: 0.13MB + Engine InnoDB
    wp_rg_lead_detail_long: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_rg_lead_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_rg_lead_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_tbf_fixes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_tbf_fix_posts: Data: 0.45MB + Index: 0.31MB + Engine InnoDB
    wp_tbf_fix_post_details: Data: 18.52MB + Index: 0.94MB + Engine InnoDB
    wp_tbf_revisions: Data: 27.52MB + Index: 0.22MB + Engine InnoDB
    wp_tbf_search: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Data: 0.16MB + Index: 0.17MB + Engine InnoDB
    wp_term_relationships: Data: 0.31MB + Index: 0.25MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.14MB + Index: 0.16MB + Engine InnoDB
    wp_thesis_terms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_usermeta: Data: 12.52MB + Index: 14.03MB + Engine InnoDB
    wp_users: Data: 1.52MB + Index: 0.84MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 1.52MB + Index: 0.58MB + Engine InnoDB
    wp_wc_download_log: Data: 0.47MB + Index: 0.45MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yarpp_keyword_cache: Data: 0.14MB + Index: 0.00MB + Engine InnoDB
    wp_yarpp_related_cache: Data: 0.11MB + Index: 0.16MB + Engine InnoDB
    wp_yoast_indexable: Data: 5.52MB + Index: 2.94MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Data: 1.48MB + Index: 0.69MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 5005
    ccpurge_log_entries: 6
    custom_css: 1
    lasso-urls: 47
    mbt_book: 18
    nav_menu_item: 20
    oembed_cache: 626
    page: 64
    post: 927
    postman_sent_mail: 72
    pretty-link: 6
    product: 133
    revision: 2797
    safecss: 1
    shop_coupon: 5
    shop_order: 8274
    shop_order_refund: 13
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (44) ###
    
    ManageWP - Worker: by GoDaddy – 4.9.7
    Gravity Forms: by Gravity Forms – 2.4.21
    AJAX Thumbnail Rebuild: by junkcoder
    ristoniinemets – 1.13
    
    Akismet Anti-Spam: by Automattic – 4.1.7
    Broken Link Checker: by WPMU DEV – 1.11.15
    Classic Editor: by WordPress Contributors – 1.6
    Cloudflare: by Cloudflare
    Inc. – 3.8.7
    
    Export All URLs: by Atlas Gondal – 4.1
    Facebook for WooCommerce: by Facebook – 2.2.0
    Genesis Connect for WooCommerce: by StudioPress – 1.1.1
    Genesis eNews Extended: by Brandon Kraft – 2.1.5
    Genesis Simple Edits: by StudioPress – 2.3.1
    Genesis Simple Hooks: by StudioPress – 2.3.0
    Official Mad Mimi Signup Forms: by Mad Mimi
    LLC – 1.7.1
    
    MainWP Child: by MainWP – 4.1.3
    Mediavine Control Panel: by mediavine – 2.5.0
    Create by Mediavine: by Mediavine – 1.6.4
    Ultimate Nofollow: by 5fifty – 1.4.8
    Official Facebook Pixel: by Facebook – 2.2.2
    Pin It Button for Pinterest: by Pinterest – 1.0
    Post SMTP: by Yehuda Hassine – 2.0.16
    Protect Uploads: by Alexis Blondin – 0.3
    Really Simple SSL: by Really Simple Plugins – 4.0.5
    Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.4
    Optimize Database after Deleting Revisions: by CAGE Web Design | Rolf van Gelder
    Eindhoven
    The Netherlands – 5.0.3
    
    Simple 301 Redirects: by Scott Nellé – 1.07
    Simple Share Buttons Adder: by Simple Share Buttons – 8.1.1
    Simple Social Icons: by StudioPress – 3.0.2
    SumoMe: by SumoMe – 1.31
    Tasty Pins: by WP Tasty – 1.2.0
    Thumbnail For Excerpts: by Radu Capan – 2.1
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.16.44
    
    Product Customer List for WooCommerce: by Kokomo – 2.9.3
    WooCommerce - Autocomplete Orders: by Serious Plugins – 1.1.4 – Installed version not tested with active version of WooCommerce 4.0
    WooCommerce Colors: by WooThemes – 1.0.7 – Installed version not tested with active version of WooCommerce 4.0
    WooCommerce Export Customer Email: by MH Mithu – 1.3 – Installed version not tested with active version of WooCommerce 4.0
    WooCommerce Stripe Gateway: by WooCommerce – 4.7.0
    WooCommerce Google Analytics Integration: by WooCommerce – 1.5.0
    WooCommerce Mad Mimi integration: by WooThemes – 1.2.1 – Installed version not tested with active version of WooCommerce 4.0
    WooCommerce: by Automattic – 4.8.0
    Yoast SEO: by Team Yoast – 15.5
    Smush: by WPMU DEV – 3.8.2
    WP Super Cache: by Automattic – 1.7.1
    Lasso: by Lasso – 252
    
    ### Inactive Plugins (5) ###
    
    AVH Extended Categories Widgets: by Peter van der Does – 4.0.6
    CloudFlare(R) Cache Purge: by Bryan Shanaver @ fiftyandfifty.org – 1.2
    Health Check & Troubleshooting: by The www.remarpro.com community – 1.4.5
    Link Fixer: by Keith P. Graham – 2.9
    The Blog Fixer: by Kris Kimball – 0.7.0.10
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Must Use Plugins (2) ###
    
    Health Check Troubleshooting Mode: by  – 1.7.1
    ManageWP - Worker Loader: by ManageWP –
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ?
    
    ### WC Pages ###
    
    Shop base: #30974 - /shop/
    Cart: #30978 - /cart-2/
    Checkout: #30976 - /checkout/
    My account: #16854 - /my-account/
    Terms and conditions: #32339 - /terms-of-use-for-the-kennedy-adventures/
    
    ### Theme ###
    
    Name: Innov8tive Child Theme - 2020 update
    Version: 1.0.2
    Author URL: https://market.studiopress.com/themes/innov8tive
    Child Theme: ?
    Parent Theme Name: Genesis
    Parent Theme Version: 3.3.3
    Parent Theme Author URL: https://www.studiopress.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 5,885
    Oldest: 2020-12-04 12:37:11 -0500
    Newest: 2021-01-04 12:17:03 -0500
    
    Failed: 1
    Oldest: –
    Newest: –
    
    Pending: 3
    Oldest: 2021-01-04 12:32:03 -0500
    Newest: 2021-01-11 04:16:13 -0500
    
    
    Plugin Support mouli a11n

    (@mouli)

    @davidborrink
    I see that you are using PHP 7.4.11 which is fine.

    Could you please send us the full text of the error. In particular, whether it is a PH Warning, Notice or Fatal Error.
    If it is a Warning or Notice you can ignore them as they are aimed at developers, and you can disable them as detailed here:
    https://support.hostinger.com/en/articles/1583189-can-i-hide-errors-and-warnings-that-are-displayed-on-my-website

    If they are Fatals, we would need to look further into this.

    I hope that helps you to figure it out.
    Feel free to get back to us if you have further questions.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers!

    Thread Starter David Borrink

    (@davidborrink)

    Hi guys, sorry for not responding sooner. I tried the above method from Mouli, and the change to the WP-config file did not do anything. The error message remained and was not hidden. I tried the htaccess method and got a 500 error.

    The full message of the warning is:

    SyntaxError: JSON Parse error: Unexpected identifier “Curl”

    Thread Starter David Borrink

    (@davidborrink)

    If you wish to see the results for yourself, you can go and check-out this free item at the shop and see the results when you go to checkout.

    https://thekennedyadventures.com/product/rosary-coloring-books/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Free item purchase has a syntax error message’ is closed to new replies.