Bug report: admin_url() returns *mapped* domain with HTTPS URL

Domain Mapping v4.4.0.5, WordPress 4.2.2 in subdir WPMS mode. Admin and login are forced to original domain, cross-domain autologin is enabled, and HTTPS is forced for login and admin pages (but not for front-end pages)

Looks like we have another bug relating to admin_url(), possibly of a similar nature to

https://wpmudev.com/forums/topic/bug-report-admin-bar-links-to-wrong-wp-admin-urls-mapped-domain-possibly-also-sso-problem

admin_url() is returning mapped domains with https:// prefix which, in 99% of cases, will result in a CN mismatch.

In this particular instance, the problem is revealed in WPMUdev Appointments+ (v1.4.7, appointments.php lines 4158 and 5071) in which that plugin is calling wp_localize_script() with ‘ajax_url’ => admin_url(‘admin-ajax.php’:wink:. Instead of returning:

https://original.com/siteslug/wp-admin/admin-ajax.php

it is returning

https://mapped.com/wp-admin/admin-ajax.php

even when admin_url() is being called with the protocol forced to http://, per this support case here:

https://wpmudev.com/forums/topic/incompatibility-between-appointments-and-domain-mapping-plugins

and so the AJAX call fails because the browser won’t connect to POST the AJAX request.

Let me know if there’s anything I can do to assist in debugging this case.

Thanks,

DK