Domain mapping causing mixed content with admin-ajax.php in wp-admin

When domain mapping is active, any requests to admin-ajax.php via wp-admin on subsites are blocked due to mixed content errors.

We've gone through the database and changed references from http:// to https:// and htaccess is rewriting http to https ok.

  • James Morris
    • WordPress Enthusiast

    Hello Brian Andersen

    I hope you are well today.

    I just tested out the scenario described in your chat transcripts on a fresh Multisite Network with Domain Mapping and Divi/Divi Builder installed and configured. Both with a subsite that has a mapped domain and with a subsite that does not have a mapped domain. In both cases, I was not able to replicate the symptoms you're describing. This leads me to suspect there may be something specific to your configuration that is causing these symptoms.

    In order to help you better with your issue, would you please grant me access to your site and server so I can perform some advanced debugging? I understand you can only provide SSH access. This is fine. Upon initial contact I will provide a Google account that can be used to grant access.

    NOTE: Please make a full backup of your site before sending the following information.

    Please visit the Contact page and complete the form with the following information:

    https://premium.wpmudev.org/contact/#i-have-a-different-question

    Option: I have a different Question

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - Admin login:
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    - SSH credentials
    host
    username
    password/key file
    (and port if required)

    Best regards,

    James Morris

  • Jan
    • Design Lord, Child of Thor

    Hi Brian Andersen

    from your description, this looks like an issue I was able to backtrace and fix just yesterday. Check the fix and details here (ignore the topic, it's most probable the same root cause):

    https://premium.wpmudev.org/forums/topic/login-form-action-remains-http-for-unmapped-domain-on-https-only-site#post-1318572

    Take a look at "Hotfix / Workaround". Solved the issues on our sites. Should work for you too.

    Best Regards,

    Jan

  • Brian Andersen
    • WPMU DEV Initiate

    Sorry to bring this up again, but this issue still causing major problems... When applying the settings sugested by Jan, everything works as expected on a mapped domain, but it's does not work with builders on frontend with not mapped domains...

    Any update on when you have a stable fix ready for this problem??? I believe that Jan already has pointed out the bug in the coding...

  • James Morris
    • WordPress Enthusiast

    Hello Brian Andersen

    I spoke with the Lead Dev on this project today and he has assured me that he is working on an update for this now. Unfortunately, we're finding that this bug is inconsistent, meaning it's not showing up in every scenario, but only on certain setups with certain hosts. So, it's been a bit problematic to resolve. But, our team is working on this and will publish a hotfix/update as soon as technically possible. Thank you for your patience while we sort through this.

    Best regards,

    James Morris

  • blue
    • Design Lord, Child of Thor

    We're having this issue as well. https://premium.wpmudev.org/forums/topic/how-can-i-force-admin-ajax-php-to-load-over-https

    If the bug is inconsistent, for those of us experiencing it, would it be helpful to know about our server environment and plugins installed?

    In the meantime, we've temporarily solved this issue by using Really Simple SSL https://wordpress.org/plugins/really-simple-ssl/

    Activate it Per Site and use .htaccess 301 redirect for best results, but there are other options you can use as well. This is allowing us to continue business as usual until the underlying issue is resolved.

    • Leonidas
      • Developer

      Hello there 360ninja :slight_smile:

      as I already mentioned to Brian below, we have a new beta that should fix this and some other issues, so you can try backing up your site and install this beta to check if this issue is/remains fixed. You can let me know of any update, on this thread.

      Best regards,
      Leonidas

    • Leonidas
      • Developer

      Hello there Brian Andersen ,

      sincere apologies for the delay here, but this issue proved to be quite tricky. Since the latest release, we have noticed that most members that had problems with builders on the frontend and Domain Mapping, are having their issues fixed, but there were some cases where the issue persisted. I imagine you'd prefer not to be reliant to a different plugin like Really simple SSL, so you can try installing the latest beta I'm attaching and see if your issues are/remain fixed.

      Backing up your installation and updating the Domain Mapping plugin to this latest beta should fix this issue and some additional ones, so you can update Domain Mapping and you can let me know how that goes, in this very thread. I'm attaching the beta below:

      Best regards,
      Leonidas

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.