Error: document.documentElement.className
-
Hello, while trying to save translation on Woocommerce i got this error.
Error: document.documentElement.className = document.documentElement.className + ‘ yes-js js_active js’. Check console output for debugging information
Do not refer me to other topics. I have already try different themes, switching off the plugins nothing helped.
Even I set PHP post_max_size: 512 MB
-
Do not refer me to other topics
This is not how to how ask for my help. Your problem is not unique and if another topic seems relevant I’ll refer you to it.
I have already try different themes, switching off the plugins nothing helped.
The output you’ve posted comes from yith-woocommerce-wishlist so that plugin must be enabled when you got this error. I doubt it’s the root cause, but you should disable it anyway while investigating.
Check console output for debugging information
Have you done this? Can you post what you see?
Your output comes from the front end of your site, so my guess is your server is returning a generic HTML page instead of allowing Loco Translate to operate. This is most likely an error page from some other part of your system but I cannot make guesses at this point.
Please follow this guide and post the actual page content that your server is sending back.
Hi Tim,
first of all I don’t wanted to be rude. I have already checked other topics and they have not be resolved yet. And I see other people are being redirected to those topics no matter they haven’t be resolved. Sorry for that.
When I disable yith-woocommerce-wishlist and try to save translation of Woocommerce string I got this error in Loco translate
Page not found – Andrija?evi?. Check console output for debugging informationDebug log
[06-Jul-2018 07:47:06 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:06 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:10 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:10 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:13 UTC] [Loco.debug] "Translations don't match template. Run sync to update from woocommerce.pot" in src/admin/file/EditController.php:103 [06-Jul-2018 07:47:13 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:13 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:47:31 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743
Console log
Request URL: https://www.andrijasevic.ba/wp-admin/admin-ajax.php Request Method: POST Status Code: 404 Not Found Remote Address: 138.201.16.85:443 Referrer Policy: strict-origin-when-cross-origin
Same thing I got when I turn on yith wishlist plugin just different display error
Error: document.documentElement.className = document.documentElement.className + ‘ yes-js js_active js’. Check console output for debugging informationDebug log
[06-Jul-2018 07:51:05 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:05 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:10 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:10 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:16 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:16 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:19 UTC] [Loco.debug] "Translations don't match template. Run sync to update from woocommerce.pot" in src/admin/file/EditController.php:103 [06-Jul-2018 07:51:19 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:19 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743 [06-Jul-2018 07:51:47 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3743
Console log
Request URL: https://www.andrijasevic.ba/wp-admin/admin-ajax.php Request Method: POST Status Code: 404 Not Found Remote Address: 138.201.16.85:443 Referrer Policy: strict-origin-when-cross-origin
This confirms that you do indeed have the Not Found error. This problem has been reported dozens of times and is very often due to security software, WAFs etc… blocking Ajax requests. Whatever is generating the 404, it’s happening before Loco Translate can do its job.
You can ignore the Loco.debug line as that does not occur during the Ajax request and is harmless anyway. You should also look at the exact time of the log entries and the failed Ajax requests (to the second). Your logs above show errors across almost a whole minute so I have no way to know which lines are relevant.
The zlib buffer errors are interesting, but I don’t see how they could cause a 404 page. I would like to reproduce those notices though. Do you have any idea what you have enabled that would enable output buffer compression? Is it something you can switch off and see if it changes anything?
Ok. I turned off zlib output compression and the problem disappeared. Weird.
No errors show in console neither debug log. Translation works fine now, even if wishlist plugin is enabled it works smoothly.Looks like the problem was in zlib compression but don’t know how can that affect plugin.
This is very useful, thank you. Can you tell me what option you switched off and where? Is this a PHP ini setting or something in WordPress?
Inside the cpanel there is an option MultiPHP INI Editor where it can be changed. I put zlib.output_compression on disabled.
https://prntscr.com/k398a9-
This reply was modified 6 years, 8 months ago by
princeallex.
Thanks. I’ll see if I can reproduce an error with this setting enabled.
Thank you. You’ve helped a lot. Could you please notify us here if you had managed to reproduce the same error so we can mark a topic to resolved.
Regards
I can certainly reproduce the “zlib.output_compression” error, but this error won’t occur if Loco Translate is allow to run its Ajax request, because the WordPress shutdown routine will be skipped (on purpose).
With both WooCommerce and the Wishlist plugins enabled, I have no problem running Loco Translate with the zlib compression switched on and I’m no closer to knowing why you (and many others) get a 404 page when running Ajax.
If you fixed your issue then great, but it makes no sense to me how that option could have been the cause of a 404 page. If you want to understand where the 404 came from, you’ll have to debug that from inside your theme.
-
This reply was modified 6 years, 8 months ago by
- The topic ‘Error: document.documentElement.className’ is closed to new replies.