WordPress.org

Support

Support » Plugins and Hacks » Multisite Language Switcher » [Resolved] Error showing the main site link

[Resolved] Error showing the main site link

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Dennis Ploetner

    @realloc

    Yes, let me know if my developer-version is solving your problem:

    https://github.com/lloc/Multisite-Language-Switcher

    I think I have the same problem. It seems like Multisite Language Switcher is using the WordPress address instead of the Site address for the main site. I tried the dev version from github but the result was the same.

    I have two sites:
    Main: http://example1.com
    Second: http://example2.com

    The Multisite Language Switcher link from main to second works:
    http://example1.com -> http://example2.com
    But not from second to main:
    http://example2.com -> http://example1.com/wordpress

    I have WordPress in a sub directory like this on my main site setup like this:
    WordPress address (URL): http://example1.com/wordpress
    Site address (URL): http://example1.com

    I tried to change site_url() to home_url() in the get_permalink() function in MslsOptions.php but that did not work for some reason.

    Hi, Sorry for the late reply.
    I will be able to test it on the weekend.

    As i have only two sites, I found a workaround using the <?php is_front_page(); ?> to show a manual url on the home and use the plugin on the others.

    http://codex.wordpress.org/Function_Reference/is_front_page

    This is only temporary, but it works.

    I will wait for a new version that fix the problem.

    Thanks

    Plugin Author Dennis Ploetner

    @realloc

    @adrianb Please have a look at the indicated version first. There is no call to site_url().

    @darkpollo OK, let me know when you have some news redarding this issue.

    I se now that it is home_url() that is used here:
    https://github.com/lloc/Multisite-Language-Switcher/blob/master/includes/MslsOptions.php

    I was changing the current stable version when I was experimenting. But nonetheless the first thing I tried was using the dev version and that didn’t work, it was after that I tried to modify the stable version by switching to home_url() just like you already have done in the dev version.

    I tried again just now and swapped only the MslsOptions.php to the latest dev version and still get /wordpress in my link. home_url() shouldn’t be doing that (and it doesn’t if I put in in my theme) so I don’t know what is going on.

    Plugin Author Dennis Ploetner

    @realloc

    Do you have installed a domainmapper? How is your setup?

    Yes I’m using the “WordPress MU Domain Mapping” plugin.

    My Domain Mapping Configuration is a Server IP Address and the other settings are:

    Checked: “Remote Login”
    Unchecked: “Permanent redirect (better for your blogger’s pagerank)”
    Checked: “User domain mapping page”
    Checked: “Redirect administration pages to site’s original domain (remote login disabled if this redirect is disabled)”
    Unchecked: “Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.”

    (If that was the setting you where looking for.)

    Plugin Author Dennis Ploetner

    @realloc

    I have checked “Permanent redirect” (but I never checked what it does).

    In “Settings > Domains”: All your domains are primary domains?

    Your blogs are as subdomains or as subdirectories installed?

    I tried checking “Permanent redirect” but it did not make any difference in my case as far as I can see.

    I have only one domain (“example2.com”) under “Settings > Domains” and it’s primary.

    My sites are subdomains (that is the only way if you wan’t to use different top level domains like I do, I think).

    Plugin Author Dennis Ploetner

    @realloc

    Maybe in your case there should be a check if it’s the primary site (there is a define in wp-config.php) and if this is true a call to network_home_url() instead of home_url().

    Hi,

    I have tested this with the latest development version and it works as expected.

    Thanks!

    Plugin Author Dennis Ploetner

    @realloc

    OK. Very good!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Error showing the main site link’ is closed to new replies.
Skip to toolbar