Support » Plugin: Loco Translate » Can’t modify the template (save and sync buttons not working)

  • shwarp

    (@shwarp)


    Hi there,

    I added new strings in my theme files that I want to translate. But when I try to sync, either in the templates or the lang directly, the button animation runs indefinitely and nothing happens. Same thing happened when I tried to manually add the strings to my template and hit the save button. There are some js errors in the dev console:

    admin.js?ver=2.5.2:12 Uncaught TypeError: Cannot read property 'length' of undefined
        at Object.p (admin.js?ver=2.5.2:12)
        at c (jquery.min.js?ver=3.5.1:2)
        at Object.fireWith [as rejectWith] (jquery.min.js?ver=3.5.1:2)
        at l (jquery.min.js?ver=3.5.1:2)
        at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.5.1:2)
    p @ admin.js?ver=2.5.2:12
    c @ jquery.min.js?ver=3.5.1:2
    fireWith @ jquery.min.js?ver=3.5.1:2
    l @ jquery.min.js?ver=3.5.1:2
    (anonymous) @ jquery.min.js?ver=3.5.1:2
    
    Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR /wp-admin/admin-ajax.php:1
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Hi,

    The JavaScript error is actually an error in the handling of the error. This was fixed in the current dev version, but the real error is the last bit…

    ERR_HTTP2_PROTOCOL_ERROR

    This can happen over http2 with certain server modules installed that produce incorrect headers (for example, apache compression module is known to do this). I can’t say in your case exactly what is happening, but personally I’d do this:

    1. Install the dev version of Loco Translate to get rid of the annoying script error.

    2. Disable http2 to see what’s going on. and take it from there.

    Thread Starter shwarp

    (@shwarp)

    Hi Tim, thx for the quick answer!

    So I tried:
    1. To install the dev version, but I still have the exact same errors
    2. To disallow http2 via this line in the .htacess: Header edit Upgrade (.*)h2,h2c(.*) "$1$2", and I still have the exact same errors (the thing is I’m just the developer, and I don’t have access to the server config)

    Plugin Author Tim W

    (@timwhitlock)

    1. You can’t have the exact same script error with the dev version, because this script error was fixed. Please post your console output for this error with the dev version installed.

    2. If you still get ERR_HTTP2_PROTOCOL_ERROR then you have not disabled http2. Probably you’ve not restarted your server, but really this is beyond the remit of my support.

    Thread Starter shwarp

    (@shwarp)

    Ok so I initially installed the dev version from wordpress.org. I replaced it with the github version and indeed the errors are different, here’s what I get:

    Ajax failure for sync {status: 0, error: "error", message: "", output: ""}
    admin.js?ver=2.5.3-dev:276
    
    Rappelez le texte suivant lorsque vous signalerez un problème:
    ----
    Status 0 "Erreur inconnue" (Unknown type 0 bytes)
    Blank response from server
    ====
    
    jquery.min.js?ver=3.5.1:2
    POST https://www.beezup.com/wp-admin/admin-ajax.php net::ERR_HTTP2_PROTOCOL_ERROR 200
    send @ jquery.min.js?ver=3.5.1:2
    ajax @ jquery.min.js?ver=3.5.1:2
    s.ajax.s.ajax @ jquery-migrate.min.js?ver=3.3.2:2
    p @ admin.js?ver=2.5.3-dev:351
    f.post @ admin.js?ver=2.5.3-dev:411
    F @ editor.js?ver=2.5.3-dev:156
    (anonymous) @ editor.js?ver=2.5.3-dev:66
    dispatch @ jquery.min.js?ver=3.5.1:2
    v.handle @ jquery.min.js?ver=3.5.1:2
    Plugin Author Tim W

    (@timwhitlock)

    Ok, good. The script error is gone. It now shows correctly that you are not getting a response from your server.

    However, you are still showing ERR_HTTP2_PROTOCOL_ERROR, so you are still using http2. I don’t think you’ll be able to debug the HTTP response properly until you can get rid of this protocol error.

    Server errors from Ajax requests are almost always due to server modules or security software interfering. There are hundreds of similar posts in this forum, but I can’t provide personal help debugging these kind of issues.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.