This topic has 12 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #177487
     FD
    Participant

    Hi,

    After upgrading to the last version of Kleo we are having trouble with the check out for logged in users.
    When trying to check out we are getting this error messages in dev console:

    Unable to fix malformed JSON (checkout.min.js?ver=3.2.1:1)

    And this one on the site:

    SyntaxError: Unexpected token < in JSON at position 0

    We have tried to deactivate Kleo and activated WordPress Twenty Seventeen. When testing using Twenty Seventeen it all worked, but with Kleo it fails.

    #177608
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #177687
     Radu
    Moderator

    Hi,

    Tried to purchase something and cannot see that kind of error

    It’s ok now ?

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #177696
     FD
    Participant

    Hi,

    You have to fill out all fields and add CC card info, then click “Send ordre”. After that you will get this error:

    Error message:
    SyntaxError: Unexpected token < in JSON at position 0

    Take a look at attached screenshot. When trying the same with the default WP theme it´s all working. If you could tell me when you are going to test it I will put the CC module in test mode.

    #177852
     FD
    Participant

    Hi,

    Any update on this issue?

    #177991
     Radu
    Moderator

    Hi,

    Try to de-activate all plugins excluding woocommerce and de-activate also the child theme and check if the issue disappears.

    Tried to take a look at the wp admin but it’s empty i cannot do nothing, enable wp_debug to see it’s some error it’s generated, i will paste the procedure below.

    Please update the theme to latest version 4.0.4 and the afferent plugins, you can check the plugin update status from wp-admin -> appearance -> install plugins.

    If this is useless please follow these steps to enable wp debug:

    •  Connect to your server by FTP
    • Look in root directory of your WordPress install and open wp-config.php
    • Search for define( ‘WP_DEBUG’, false ); and change FALSE value to TRUE
    COPY CODE
    define( 'WP_DEBUG', true );
    
    •   After this line add this:
    COPY CODE
    define( 'WP_DEBUG_LOG', true );
    

    WP_DEBUG_LOG is a companion to WP_DEBUG that causes all errors to also be saved to a debug.log log file inside the /wp-content/ directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request or wp-cron run).

    Repeat the described actions and then check the debug.log file and let me know what error appears.

    If this is useless please try to deactivate additional plugins except Visual Composer, K-elements, BuddyPress, Paid memberships pro and revolution slider.

    After you have disabled the plugins try to see if the error persists.

    Cheers
    r.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #178011
     FD
    Participant

    Hi,

    I have tested with the default WP theme and then it all works like it should. After changing back to Kleo (4.2.12) it breaks. I have also disabled all plugins except WooCommerce and the error is still there when running Kleo theme (4.2.12), but not when running WP default theme.

    We are running the lastes versions of all plugins and themes we are using.
    We are running Kleo 4.2.12.

    I will send you an new login. Login from “wp-admin” is disabled due to security.
    Use this link to get admin access (Valid in 24 hours):
    https://www.fjelltid.no/wp-admin/?wtlwp_token=0c63b5caeb750b616f1c8fc70215e184

    We have checked the debug log. Nothing there. The only error we can find is this (from the php error log):

    COPY CODE
    
    The WC_Cart::get_cart_url function is deprecated since version 2.5. Replace with wc_get_cart_url.
    
    The "SyntaxError: Unexpected token < in JSON at position 0" real error is "
    {"result":"failure","messages":"<ul class=\"woocommerce-error\">\n\t\t\t<li>Vi klarte ikke \u00e5 behandle ordren din. Vennligst pr\u00f8v igjen.<\/li>\n\t<\/ul>\n","refresh":true,"reload":false}"
    

    You can reproduce it with this url: https://www.fjelltid.no/fjellbutikken/kasse/?wc-ajax=checkout

    Thank you for your help!

    #178122
     Radu
    Moderator

    Hi,
    Tried to reproduce on my local install and i cannot see that error during the checkout process, i have all update theme and woocommerce.

    If you had modified some kleo template files in child, try to de-activate child theme and purge/empty all caches then check again if you are able again to reproduce the issue.

    If you continue to have same issue provide again wp admin + ftp login to take a closer look at that

    Let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #178362
     FD
    Participant

    Hi,

    We have tried to deactivate our child theme just to be sure, but that did not solve anything. We have done some modifications, but not that much. So there must be something else.

    Here are a new wp-admin link:
    https://www.fjelltid.no/wp-admin/?wtlwp_token=7b3ddcd5d0d0d01732dceffde70585ff

    To give you SFTP access we need an IP-address to put on the whitelist. Please provide us with that. 🙂

    Thank you for your help!

    #178413
     FD
    Participant

    We also get this error in out logs:

    2017/10/30 15:55:31 [error] 5682#0: *13598 FastCGI sent in stderr: “PHP message: The WC_Cart::get_cart_url function is deprecated since version 2.5. Replace with wc_get_cart_url.
    PHP message: The WC_Cart::get_cart_url function is deprecated since version 2.5. Replace with wc_get_cart_url” while reading response header from upstream, client: 172.31.35.64, server: http://www.fjelltid.no, request: “POST /?wc-ajax=get_refreshed_fragments HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.fjelltid.no”

    #178532
     Radu
    Moderator

    Hi,

    Searching on our theme for that function that it says deprecated but there is no place to find it.

    We are using the function that debugger recommends.

    I recommend you to turn off ALL plugins + child theme and also the cloudflare js moinification layzload any any feature but empty purge all caches before disabling.

    If you somehow you are running php7 change to 5.6 and check again keeping the things de-activated.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #178581
     FD
    Participant

    Hi,

    We have already (as mentioned earlier) turned off all plugins, child theme, cleared all cache and disabled our CDN (We are using cloudfront, not cloudflare). THE ONLY THING THAT´S HELPING IS CHANGING FROM KLEO THEME INTO WORDPRESS DEFAULT (TWENTY SEVENTEEN). THEN IT´S ALL WORKING!

    Cloud you just understand that we have tried all tings we could think off and now we need you to have a closer look and check what your theme does or crashes with.

    Please provide us with you IP so we can put it on the whitelist so you can login via SFTP and have a closer look. Your WP-ADMIN access expires in 1 day.

    Please help us find an solution.

    Maybe @abe are able to help?

    #178658
     Radu
    Moderator

    Hi,

    I have a dynamic IP, can you restrict by country ? if yes use Romania as exception, at this moment i don’t know the IP from the office.

    Please provide wp admin username and password not the magic url for login, it may need to de-activate all plugins including that one for a better debugging process and FTP.

    In first instance provide to me requested login details, and if i encounter issues while debugging i will speak with abe related to this issue.

    Let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 13 posts - 1 through 13 (of 13 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?