Upfront editor doesn't work on mapped domain with HTTPS

When mapped domain has SSL and you start UF editor it will not load and will show console errors that are not showing when original domain is used:

When original domain option is set in DM it will work fine, so it only happens when on mapped domain.

Forcing admin ssl in wp-config should help with replicating the issue.
define('FORCE_SSL_ADMIN', true);

On storegear network you can see the issue on santamonicanative subsite.

If domain mapping had condition that checked for "$_GET['editmode'] == 'true'" and then forced it to not use the mapped domain for editing, would be working for me and safer.

I have modified the following to make it work:

function is_excluded_by_id( $post_id ){
if($_GET['editmode']) { // ben start

return apply_filters("dm_is_excluded_by_url", true);
} // ben end
if( is_null( $post_id ) ) return apply_filters("dm_is_excluded_by_id", false);
return apply_filters("dm_is_excluded_by_url", in_array( $post_id, self::get_excluded_pages( true ) ), $post_id);

    Hello Ben,

    Since Tyler, and Predrag wasn't able to replicate this initially, I'm bringing this into the developers attention so that they could check your system, and see whether it what's being missed here. Could you please send us your websites credentials so that I could pass it to the developers so that they could also check, and compare with your settings to have a better idea.

    You can send credentials by using our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    - To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Have a nice day.

    Kind Regards,


    Can you please confirm ALL of the following is tested before proceeding:
    1. NETWORK set up
    2. You are editing a SUB Domain
    3. Subdomain has a mapped domain
    4. Settings for mapped domain are: Front end redirect should be: Directed to mapped primary domain
    5. In wp-config.php the following is set: define('FORCE_SSL_ADMIN', true);
    6. https is NOT set up on server for mapped domain.

    Please let me know this is the exact scenario being tested by your team.



    I can confirm this same problem. With a bit of testing I think I found a temporary solution that doesn't include modifying files. There are two options, The first is to go into the Domain Mapping plugin network options and changing the "Administration" to "Mapped domain" or "domain entered by the user". However, this just won't work if you want to force ssl in the admin area. The second option is to go into the Domain Mapping options for the specific site in question and excluding the url of the page you're editing which should read "?editmode=true" at the end.

    My guess is that when set to "Original Domain" that the domain mapping plugin is not treating the "customize" interface as part of the admin area for the purposes of forcing the original domain on admin pages (after all, it is the index page with a query string). However, Upfront seems to load its resources as if it WERE an admin area, using/demanding the settings in the Domain Mapping plugin.

    I hope this helps.