trouble with admin_url() path failing by falsely using https on mapped domain

I am trying to use the upfront theme but running into some problems.

I noticed that upfront uses admin_url() in many many locations, however it seems to not be operating correctly for me.

it will constantly try to reference https://mappeddomain.com/wp-admin/blahblah to load js files relating to upfront

if I manually rewrite the path by modify upfront in a variety of locations...no issues.

I noticed on another network it makes use of http://mappeddomain.com/wp-admin/blahblahblah

But again i believe this could be considered a fail even thought it works.

If a network domain is set up with the wordpress config force https on login or admin, then i would like to see domain mapping remap the use of admin_url to:

network_site_url(get_blog_details( get_current_blog_id() )->path . 'wp-admin/', 'https');

Thoughts on this fix...? Or is this the intended behaviour but it is not working.

Thanks.

I'm up to date with ur domain mapping plugin

  • Sajid

    Hi Ben,
    Hope you are doing good today :slight_smile:

    This is intended behavior and Upfront is working just fine for me on my own test site on a mapped domain.

    What upfront theme you are using ? Also please enable support staff access so I can take a closer look. You can grant access from WPMU DEV -> Support -> Support Access -> Grant Support Access or see this manual.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Ben

    Sajid,

    I am opening up support access, but will also re-email a private message to a mapped domain for you to review that I have set up with upfront.

    I'd like to know if I have my settings off. Or if there is anybody else avail sooner, please chime in. I have the site active live with the upfront theme live for review.

    I can fix the live site to display properly by modifying the domain mapping admin_url() functionality with the following code:

    domain-mapping/classes/class.domainmap.php line 150

    if ( !is_admin() ) {
        // swap the original url with the mapped one
        //$admin_url = str_replace( $orig_url, $mapped_url, $admin_url ); //ben
       $admin_url = str_replace( $mapped_url, $orig_url, $admin_url ); //ben
       $admin_url = set_url_scheme($admin_url, self::utils()->get_admin_scheme( $admin_url ) ); //ben
    }

    But this does not fix the issues I am having with the upfront editor mode. I have my fix disabled so that you can see the issue for further debugging.

    Would love some advise on a solution asap, do I have your settings not set properly?

    Thanks.

  • Sajid

    Hi Ben,
    Hope you are doing good today :slight_smile:

    I am getting 502 Bad Gateway error while accessing your website with support staff access (see screenshot).

    However, I can see the issue with your mapped domain. But I am being redirected to home page when I try to access the site with original domain and subdirectory path.

    Please send in the username and password of your website in the reply of my email, so I can take a closer look at your settings to see why its causing this issue.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Sajid

    Hi Ben,
    Hope you are doing good today :slight_smile:

    I contacted the developer and he also could not reproduce this issue on his own staging environment. He further added that, he is ready to release the new version of Domain Mapping plugin later today or tomorrow (if everything goes well) that should fix issues on your site. Please wait for the release and update the plugin to see if that fixes the issue.

    Thank you very much for your patience and have a nice day :slight_smile:
    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.