Support » Plugin: Multiple Domain Mapping on Single Site » Navigation and other links not reflecting desired domain

  • deejmer

    (@deejmer)


    I have the plugin successfully installed and most things work. The root of the domain resolves to the proper page. If I type in another mapped URL manually into the URL bar, it too will resolve as desired.

    The issue seems to be with internally generated links by WordPress. The navigation using standard WordPress Menus generates link URLs that are not reflecting the desired root domain. Also, in-page links driven by WordPress CMS (Advanced Custom Fields in use here, by the way) are also not reflecting the desired root domain. Relative links hard coded in the template seem to be replaced properly (logo and Contact Us link in header and logo in footer).

    Lastly, when I view the page source, the canonical URL is not reflecting the desired root domain, instead the ‘core’ domain for the site is shown.

    Is this expected behavior and if not, any idea how I can troubleshoot?

    For more context, I’m supplying images of my mapping rules as well as redirect rules that I have setup in web.config (I’m running WordPress on Azure IIS, hence the web.config instead of .htaccess) in case there are conflicts.

    Mappings: https://i.imgur.com/1f79Dvv.png
    web.config rewite rules: https://i.imgur.com/JoofNZw.png

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,

    since you are using a custom theme, my first guess is to check if the theme uses the standard menu walker. or if it is a custom walker, if this one uses get_permalink to generate the links. is it possible for you to check this, or maybe create a copy of the website where you could switch to a different theme for testing purposes?

    your theme and whole site setup looks professional, so it could be anyway that the problem lies somewhere else, but it is a good starting point 🙂

    matt

    deejmer

    (@deejmer)

    Hello Matt, and thanks for your response.

    It is a custom theme that is built on a Bootstrap 4 starter theme: https://github.com/babobski/Bootstrap-4-on-WordPress

    The menus use a custom walker which I do not clearly see “get_permalink” being used in the code: https://github.com/dupkey/bs4navwalker

    I can understand how the menus might not work due to this, but why then would by system-generated buttons and links (using Advanced Custom Fields) as well as the canonical URL still reflect the original domain instead of the vanity domain?

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,

    yes that walker looks fine and you are right with the canonical url. do you have the chance to set up a fresh wordpress instance on this hosting environment (e.g. with some subdomains) with a standard theme and then go step by step with enabling this theme and your plugins one by one?

    it’s hard to find a good starting point otherwise, since it does the rewrite for some links :/

    matt

    deejmer

    (@deejmer)

    That is going to be very tough. Currently, we do not have a staging location and the domain we are using is pointing to our production environment.

    Do you know if your plugin is known to conflict with W3 Total Cache? It’s the only one that I can think of that would be messing with any paths or redirection in WordPress. I disabled caching while I was setting up this plugin per the instructions.

    The only other thing that *could* be messing with paths are the rewrite rules set up in our web.config file (running WP on ISS in Azure) which you can see here: https://i.imgur.com/svox4XC.png

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,

    i have overlooked the fact that you are using w3 total cache. by now, we are still searching a caching plugin that is compatible. unfortunately, they mostly use the slug as identifier and therefore it will happen, that the main page of the root domain and the mapped page (both with slug / ) can be swapped. but there has passed some time since we last tried it with w3 total cache. please see if disabling helps.

    the rewrite rules don’t seem to have any impact for me.

    otherwise, i’d really suggest the explained way, so you set up an installation with some dummy-subdomains in the same hosting environment…

    matt

    deejmer

    (@deejmer)

    Thank you, I will have to wait until a low traffic time (over night) to test disabling W3C Total Cache as it will have impact to our visitors. I’ll report back what I find out after I try disabling it.

    Thank you!
    – DJ

    deejmer

    (@deejmer)

    I tried disabling W3C Total Cache but it did not seem to fix the issue with links. In fact, when I have page caching enabled, the domain mapping fails altogether.

    My best guess would be that there is a conflict with Advanced Custom Fields Pro as that is the engine rendering all of the links within my templates. At this point, I may have to abandon this plugin in favor of introducing WP Multisite as I cannot get this plugin to work nicely with my environment. Thanks for the support!

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hy deejmer,

    thanks for your reply. acf alone should not be a problem, since the links need to be generated by some get_permalink() or similar function of wordpress. i’m sorry that we can’t provide further support without the debugging information of trying it with another installation on the same webspace…

    good luck for your project and feel free to get back if you have further questions 🙂
    matt

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.