Finally 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.