hudolejev
Forum Replies Created
-
Same issue here, see also: _trackPageLoadTime
Same solution worked:
WP-Admin > Settings > Google Analytics > Show advanced settings: [v]
Advanced Settings > Disable Site Speed tracking: [v]
Why on earth someone would call options ‘Disable …’? Logically is to call them ‘Enable …’ and check to enable things, right? Even worse, some options there are ‘Enable …’ and some are ‘Disable …’. Sick.
Forum: Plugins
In reply to: [WP DS FAQ] [Plugin: WP DS FAQ] Failed to edit questionIn case they delete my code again, here it is:
Forum: Plugins
In reply to: [WP DS FAQ] [Plugin: WP DS FAQ] Does not parse quotes correctlyThe problem is, WordPress is doing auto-escaping itself, even if
magic_quotes_gpc
are turned off. This is ugly and stupid, but assuming we have to live with it, here is a possible hack. In filewp-content/plugins/wp-ds-faq/ajax.php
:[Code moderated as per the Forum Rules. Please use the pastebin]
Fixed the issue for me.
= EDIT =
Oh well. Now they are deleting my code. Here it is:
Also it appeared that I was wrong and the quotes get extra-escaped even in wp-admin. So both
frontend_update_quest
andupdate_quest
have to be fixed inajax.php
.Forum: Plugins
In reply to: [WP DS FAQ] [Plugin: WP DS FAQ] Failed to edit questionFinally found the root of the problem.
My wp-admin is working via HTTPS. When I try to edit or delete questions in
wp-admin / Settings / DS_FAQ
I get the ‘Ajax Error 5’ mentioned above, and the following line being logged to JS console:
XMLHttpRequest cannot load http://foo.bar/wp-content/plugins/wp-ds-faq/ajax.php. Origin https://foo.bar is not allowed by Access-Control-Allow-Origin.
This thread on StackOverflow has some details, I won’t copy them here, just go and read there if interested.
The fix is very simple. My modifications of
wp-content/plugins/wp-ds-faq/ajax.php
are below.Before:
<?php require_once(preg_replace('|wp-content.*$|','', __FILE__) . 'wp-config.php'); header('Content-type: text/javascript; charset='.get_settings('blog_charset'), true); header('Cache-control: max-age=2600000, must-revalidate', true); function error(){ die( "alert('Что-то не заработало :(')" ); } /* ... */
After:
<?php require_once(preg_replace('|wp-content.*$|','', __FILE__) . 'wp-config.php'); header('Content-type: text/javascript; charset='.get_settings('blog_charset'), true); header('Cache-control: max-age=2600000, must-revalidate', true); header('Access-Control-Allow-Origin: '.get_site_url()); header('Access-Control-Allow-Origin: '.str_replace('http://', 'https://', get_site_url())); function error(){ die( "alert('Что-то не заработало :(')" ); } /* ... */
Two
header('Access-Control-Allow-Origin')
lines added, that’s it.Enjoy.
Forum: Plugins
In reply to: [WP DS FAQ] [Plugin: WP DS FAQ] Does not parse quotes correctlyI have the same issue (WP 3.1.3, 3.2.1, 3.3).
This happens if editing questions directly on FAQ page that is displayed to visitors. I cannot check if it is working from inside wp-admin as the plugin (or my setup) seems to have another issue with that, but it used to work correctly in wp-admin before.
magic_quotes_gpc
is off.