Domain mapping issues

I now just noticed a serious issue with Domain Mapping under multisite & SSL. My issue is very similar this problem except that I am SSL securing the backend.

I use domain mapping plugin by WPMUDEV and when trying to edit the frontend with beaver builder, it doesn’t do anything, just sits there with no editing capabilities. It’s just like in the example link above, except I cannot solve it by setting ‘Administration mapping’ & ‘Login mapping’ to ‘Mapped Domain’- this absolutely breaks the ssl bigtime with a certificate domain name mismatch "do not trust site’ warning. I have a wild card certificate, so I have to force every login and admin area to use the original subdomain url.

Also, I’m guessing with my setup, if the builder was working, the auto-suggest when adding links within the builder would report the wrong link, just showing the subdomain link instead of the mapped domain link.

Do you have any ideas on how to fix this? If the page builder just pointed to the subdomain url of a page, maybe it should be able to edit like before?

Thanks,
Carmelo

Hi Carmelo,

I have already assigned someone from the development team to assist you with your issue.

Ben

Hey Carmelo,

Sorry to hear about the issues, we’ll need to dig in to figure out what might be going on in your particular setup. Can you please provide us temp admin access as well as FTP? One of us will take a look at this as soon as we can!

Best,
Billy

Cool, thanks guys. Let me set up ftp and admin access…

[Content Hidden]

Thanks, Carmelo. I will check this out.

Also, I’m guessing with my setup, if the builder was working, the auto-suggest when adding links within the builder would report the wrong link, just showing the subdomain link instead of the mapped domain link.

I can’t make any promises that the auto-suggest issue will get fixed with this. As I’ve mentioned before, we’re using a core function to pull the permalinks, so we have no control over what is returned.

I’ll let you know what I find.

Justin

Hi Carmelo,

I tested this out and unfortunately, it’s the same issue. We’re using get_permalink to create the edit URL for the builder. That is returning the same URL that the admin “View” link is using. Also, even if I go to the subdomain manually, it redirects to the mapped domain like so…

http://tester342.wsaid.com/test/?fl_builder

to

http://microbreaking.com/test/?fl_builder

The reason that’s not working is because the user is only logged in on the subdomain, not the mapped domain. Most of these domain mapping plugins have some sort of cross-domain login functionality. You’ll need to get that working in order to have this work the way you want it to.

Justin

Let me see if the domain mapping plugin does that, then I’ll try again. Thanks for checking it out!

So I enabled Cross domain login functionality but I get the message: “Incorrect or out of date login key” when I try to edit a page on the mapped domain website. I also notice it does this when just viewing some pages. I’m assuming that this is coming from the WPMUDEV domain mapping plugin.

I too also noticed that it redirects to the mapped domain whenever you try to view the subdomain.

I’m currently looking this up on WPMUDEV forums. It looks like it could be a cookie issue.

So I enabled Cross domain login functionality but I get the message: “Incorrect or out of date login key” when I try to edit a page on the mapped domain website. I’m assuming that this is from the WPMUDEV domain mapping plugin…

Yes, I believe that is correct. The issue is that the user isn’t logged into the mapped domain. Can you do away with the subdomain and only have them login at the mapped domain and use that for the admin? That should solve this issue and many others that are surely going to come from having both.

Justin

This would work I believe, but would break SSL entirely. I do not intend on installing certificates for every mapped domain.

That makes sense. Then you’ll need to get the cross-domain login working for sure. If WPMU’s plugin doesn’t work, you might try looking into… https://wordpress.org/plugins/wordpress-mu-domain-mapping/

Justin

Thanks for that advice. After quite a few hours of messing with the domain mapping options on that plugin, Varnish scripting + cache purging, and clearing cookies, I made the builder pop up on the domain mapped page. Whew!

However, three new things stopped working. I was able to fix the one unrelated to Beaver Builder.

  • Apparently it’s well known that the “Wordpress Mu Domain Mapping” plugin breaks the Wordpress theme customizer. I followed some advice, literally changing just 3 characters to make it work again.

  • Little images like the search magnifying glass or the testimonial scroll images do not show up when just viewing a beaver builder page. The magnifying glass is part of theme btw. However, I can still choose existing media library images to put onto the page, no problem.

  • On the note of images, I cannot upload images through the builder. I can upload things in the media library, but not through the builder. I get an “HTTP error”.

How do I get this issue resolved? I wonder if mapped domains is causing this new issue.

Feel free to ftp or log into my site with the credentials I posted before to check out what I mean.

You guys are a lot of help. Thanks again!
-Carmelo

Hi Carmelo,

Sorry I keep using the “core WordPress” excuse for these issues! But, that is the core WordPress media uploader, we’re not doing anything special to it. My guess is that your issue might be coming from a cross-domain AJAX security error because the media uploader is loaded on HTTP but might be making AJAX requests to HTTPS. Have you tried looking in Chrome’s console when uploading to see if any errors come up?

Justin

Hmm… There are just way way too many problems I’m encountering in a simple load balancing+reverse proxy ssl+caching scenario. WordPress and most plugins I encountered seem to work fine, it’s just that Beaver Builder is the last element that has issues.

I’m considering spinning up a new single WordPress server with Apache & php-fpm, SSL cert directly on the Apache server for port 443 connections, and varnish to handle all port 80 traffic (no ssl handling). To load balance, that Varnish installation can move port 80 traffic to other rsynced cloned machines (the ones that I already have).

So…

  • Currently, The nginx reverse proxy listens to ssl port 443, forwards it to Varnish’s port 80 on the same server, then forwards it to a Wordpress server. Wordpress seems to operate somewhat fine, though is_ssl() still shows that SSL is not detected.
  • The new setup will have Varnish, SSL, and Wordpress all on one (Apache) server. Varnish will not handle any SSL traffic, but Apache that serves WordPress will. This one server will be a bit beefier in specs and I’ll have to come up with a failover plan in case it crashes.

I really am trying to make Beaver Builder work near flawlessly in a load balanced, multisite, cached, mapped domain, and SSL environment.

Do you think it will make a difference if I don’t use an SSL reverse proxy?

Hi Carmelo,

Hmm.. There are just way way too many problems I’m encountering in a simple load balancing+reverse proxy ssl+caching scenario. WordPress and most plugins I encountered seem to work fine, it’s just that Beaver Builder is the last element that has issues.

May I ask how many of these plugins work on the front-end like Beaver Builder does? I believe many of the issues you are having are the result of core WordPress pieces (such as get_permalink and the media uploader via wp.media) not working on the front-end with your current setup. As I’ve mentioned, we’re not doing anything custom with those pieces that any other plugin wouldn’t be doing. The only difference is that we’re using them on the front-end instead of in wp-admin. As we don’t have control over the logic in those pieces, we can’t make changes that would support your current setup. So, you’re only option is to adjust it, or submit a ticket to core to get it supported.

However, I could be wrong, but I’m fairly certain based on my testing that this is the case. To confirm that can you try out the Front-end Editor that is a feature plugin and will be in core soon? I wonder if the media uploader for that works for you or not. We’re using the same media uploader that they are, so I’m curious to hear how that works for you. Give that a shot and let me know how it goes.

Again, I would like to mention that the issues you are having are with things that we are doing with core WordPress APIs and are generally considered “the WordPress way”. The use of get_permalink and wp.media is well documented and is not something that we can change without hacking WordPress core.

Thanks,
Justin