struxoje
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveUnfortunately they didn’t give me any specifics on what problematic rules were 🙁
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveAnd… I have a SOLUTION!
Finally 🙂 So, long story short it looks like mod_security is causing problems with some of the ajax calls, my hosting provider is namecheap, and they have mod_sec on by default, I tried to disable it via .htaccess editing but that didn’t help. Only way how to handle this was to contact support, they have been able to confirm that mod_sec rules have been triggered, and they whitelisted problematic rules. That solved the problem. I hope this will be helpful to other people who see similar issue. I would also like to thank you for help with this which helped me pin point the problem. Perhaps config option would be not to use ajax, in case people are facing problems.
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveOk thank you. Bad luck I guess :/ It’s strange as it’s clean install… I’ll try to put few outputs in admin-ajax.php, and see if i can get anywhere
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveWith debugging enabled I see in console:
Provide the following text when reporting a problem:
–8<–
(2)
“Notice: Trying to get property of non-object in /home/site/www/wp-includes/class-wp-query.php on line 3760Notice: Trying to get property of non-object in /home/site/www/wp-includes/class-wp-query.php on line 3762
Notice: Trying to get property of non-object in /home/site/www/wp-includes/class-wp-query.php on line 3764
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveHere it is the response.It is as you said just 404 page. However, I have this problem only if I try to edit theme, however, if i do the same with plugins everything works perfectly. This is new installation, so there is nothing fancy in there and plugins are disabled
https://gist.github.com/struxoje/b3fa041aa3fa347cb0c11dc49af3646a
Btw in previous console dump there was
Provide the following text when reporting a problem:
–8<–In case that means something to you
Thank you!
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveYes looks like my posts were removed. To answer your first question, yes i truncated that because it was just raw data. So here is the console dump on gist
I disabled all plugins except Loco Translate
https://gist.github.com/struxoje/e7b4a589875662cabeae604367e4b6f3I will send full response in a min
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveAlso this is what is dumped in console, when i hit Save button
[snipped large block of code – please use Pastebin or Gist in the future]
- This reply was modified 8 years, 8 months ago by stephencottontail. Reason: snipped large block of code
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveYes I cut it on purpose it was just dictionary data.
Here is the response:
[snipped large block of code – please use Pastebin or Gist in the future]
- This reply was modified 8 years, 8 months ago by stephencottontail.
- This reply was modified 8 years, 8 months ago by stephencottontail. Reason: snipped large block of code
Forum: Plugins
In reply to: [Loco Translate] Loco Error: Ajax failure for saveI see two calls to admin-ajax.php. 1st one is 404, and second one 200. Which I don’t really understand why.When I start new translation I see that po and mo files are created, but after I change something and hit save I see that ajax error
===== call #1 ====
Request URL:https://somedomain.com/wp-admin/admin-ajax.php Request Method:POST Status Code:404 Not Found Remote Address:10.10.10.10:443 Referrer Policy:no-referrer-when-downgrade Response Headers view source Cache-Control:no-cache, must-revalidate, max-age=0 Connection:Keep-Alive Content-Encoding:gzip Content-Length:12634 Content-Type:text/html; charset=UTF-8 Date:Tue, 12 Sep 2017 15:57:21 GMT Expires:Wed, 11 Jan 1984 05:00:00 GMT Keep-Alive:timeout=3, max=200 Link:<https://somedomain.com/wp-json/>; rel="https://api.w.org/" Server:Apache Set-Cookie:woocommerce_cart_hash=84a34d860d325c7b21a21d56135d5789; path=/ Set-Cookie:wp_woocommerce_session_e3f8ba232968eac5713ed52240400abd=1%7C%7C1505404572%7C%7C1505400972%7C%7C59ad854cefe286de5ec8000198495a39; expires=Thu, 14-Sep-2017 15:56:12 GMT; Max-Age=172729; path=/ Set-Cookie:wp_woocommerce_session_e3f8ba232968eac5713ed52240400abd=1%7C%7C1505404572%7C%7C1505400972%7C%7C59ad854cefe286de5ec8000198495a39; expires=Thu, 14-Sep-2017 15:56:12 GMT; Max-Age=172729; path=/ Set-Cookie:woocommerce_items_in_cart=1; path=/ Set-Cookie:woocommerce_items_in_cart=1; path=/ Set-Cookie:woocommerce_cart_hash=84a34d860d325c7b21a21d56135d5789; path=/ Vary:Accept-Encoding X-Powered-By:PHP/7.1.9 Request Headers view source Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip, deflate, br Accept-Language:en-US,en;q=0.8,hr;q=0.6,sr;q=0.4,cs;q=0.2,bs;q=0.2 Connection:keep-alive Content-Length:498075 Content-Type:application/x-www-form-urlencoded; charset=UTF-8 Cookie:wordpress_sec_e3f8ba232968eac5713ed52240400abd=master%7C1506441364%7CfeHv5Q0OYlDL6K1JLxXzFFqY3Lk43i3quRR2tIqdF2t%7C51250bbbd42b8d3711eb10a9fe73342f2ee172cabd41e563d6d2e33b235ace39; _ga=GA1.2.1707964198.1505231745; _gid=GA1.2.290644932.1505231745; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_e3f8ba232968eac5713ed52240400abd=master%7C1506441364%7CfeHv5Q0OYlDL6K1JLxXzFFqY3Lk43i3quRR2tIqdF2t%7C0afb2398b7548c6a8881070c8bb42cba6348442f4b2164c55fdd009f0818a62b; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dhtml; wp-settings-time-1=1505231767; woocommerce_items_in_cart=1; woocommerce_cart_hash=84a34d860d325c7b21a21d56135d5789; wp_woocommerce_session_e3f8ba232968eac5713ed52240400abd=1%7C%7C1505404572%7C%7C1505400972%7C%7C59ad854cefe286de5ec8000198495a39 DNT:1 Host:somedomain.com Origin:https://somedomain.com Referer:https://somedomain.com/wp-admin/admin.php?path=languages%2Floco%2Fthemes%2FAvada-en_US.po&bundle=Avada&domain=Avada&page=loco-theme&action=file-edit User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 X-Requested-With:XMLHttpRequest Form Data view source view URL encoded action:loco_json route:save loco-nonce:5e4f41c6e1 path:languages/loco/themes/Avada-en_US.po bundle:theme.Avada domain:Avada locale:en-US data:msgid "" msgstr "" "Project-Id-Version: Avada 5.2.2\n" "Report-Msgid-Bugs-To: https://ww.wp.xz.cn/support/theme/style\n" "POT-Creation-Date: 2017-08-07 17:24:10+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-09-12 15:57+0000\n" "Last-Translator: master <[email protected]>\n" "Language-Team: English (United States)\n" "X-Generator: Loco - https://localise.biz/\n" "Language: en-US\n" "Plural-Forms: nplurals=2; plural=n != 1"======call 2======
Request URL:https://somedomain.com/wp-admin/admin-ajax.php Request Method:POST Status Code:200 OK Remote Address:10.10.10.10:443 Referrer Policy:no-referrer-when-downgrade Response Headers view source Access-Control-Allow-Credentials:true Access-Control-Allow-Origin:https://somedomain.com Cache-Control:no-cache, must-revalidate, max-age=0 Connection:Keep-Alive Content-Type:application/json; charset=UTF-8 Date:Tue, 12 Sep 2017 15:57:40 GMT Expires:Wed, 11 Jan 1984 05:00:00 GMT Keep-Alive:timeout=3, max=200 Server:Apache Set-Cookie:woocommerce_cart_hash=84a34d860d325c7b21a21d56135d5789; path=/ Set-Cookie:wp_woocommerce_session_e3f8ba232968eac5713ed52240400abd=1%7C%7C1505404572%7C%7C1505400972%7C%7C59ad854cefe286de5ec8000198495a39; expires=Thu, 14-Sep-2017 15:56:12 GMT; Max-Age=172711; path=/ Set-Cookie:woocommerce_items_in_cart=1; path=/ Transfer-Encoding:chunked X-Content-Type-Options:nosniff X-Frame-Options:SAMEORIGIN X-Powered-By:PHP/7.1.9 X-Robots-Tag:noindex Request Headers view source Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip, deflate, br Accept-Language:en-US,en;q=0.8,hr;q=0.6,sr;q=0.4,cs;q=0.2,bs;q=0.2 Connection:keep-alive Content-Length:103 Content-Type:application/x-www-form-urlencoded; charset=UTF-8 Cookie:wordpress_sec_e3f8ba232968eac5713ed52240400abd=master%7C1506441364%7CfeHv5Q0OYlDL6K1JLxXzFFqY3Lk43i3quRR2tIqdF2t%7C51250bbbd42b8d3711eb10a9fe73342f2ee172cabd41e563d6d2e33b235ace39; _ga=GA1.2.1707964198.1505231745; _gid=GA1.2.290644932.1505231745; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_e3f8ba232968eac5713ed52240400abd=master%7C1506441364%7CfeHv5Q0OYlDL6K1JLxXzFFqY3Lk43i3quRR2tIqdF2t%7C0afb2398b7548c6a8881070c8bb42cba6348442f4b2164c55fdd009f0818a62b; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dhtml; wp-settings-time-1=1505231767; woocommerce_items_in_cart=1; woocommerce_cart_hash=84a34d860d325c7b21a21d56135d5789; wp_woocommerce_session_e3f8ba232968eac5713ed52240400abd=1%7C%7C1505404572%7C%7C1505400972%7C%7C59ad854cefe286de5ec8000198495a39 DNT:1 Host:somedomain.com Origin:https://somedomain.com Referer:https://somedomain.com/wp-admin/admin.php?path=languages%2Floco%2Fthemes%2FAvada-en_US.po&bundle=Avada&domain=Avada&page=loco-theme&action=file-edit User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 X-Requested-With:XMLHttpRequest Form Data view source view URL encoded interval:60 _nonce:6dfbcfdcba action:heartbeat screen_id:loco-translate_page_loco-theme has_focus:false Name admin-ajax.php admin-ajax.php ?http_envelope=1&fields=id%2Ctype%2Cunread%2Cbody%2Csubject%2Ctimestamp%2Cmeta%2Cnote_hash&number=10