I experienced the same problem with this configuration (WordPress installed in a subdirectory, but displayed at the root) and managed to fix it with 2 simple changes:
In advanced-ajax-page-loader.php
,
1) edit line 28 to have an additional "../"
(total of 4) as wp-config.php
is now one level further away from the plugin files
require_once('../../../../wp-config.php');
2) edit lines 231 and 232, swap the parameters for get_option()
, from
var AAPLsiteurl = "<?php echo get_option('home');?>";
var AAPLhome = "<?php echo get_option('siteurl');?>";
to
var AAPLsiteurl = "<?php echo get_option('siteurl');?>";
var AAPLhome = "<?php echo get_option('home');?>";
I don’t know if they are intentionally mismatched in the first place, but after these 2 changes, everything seems to work fine.