• Hello,

    I have updated to WordPress 3.8, also installed is the latest stable version of Polylang and WP Domain Mapping plugin.

    Now the issue occur that some urls are not rewritten correctly. The home_url() property, is now shown the real home url property configured in the database instead of the actual domain mapping url.

    The question is, is it a problem related to Polylang or Domain Mapping or WordPress?

    Here is an example as it worked before the update:

    Blog 1
    Siteurl: http://siteurl.com
    Homeurl: http://siteurl.com
    Domain Mapping URLs: http://domain1.com, http://domain2.com

    When I call the blog with the site url all links are http://siteurl.com, when I open the blog with http://domain1.com, all links have this domain, same for domain2.com and so on. In the background all urls are rewritten to the actual domain.

    After the update:
    Now the most links are correctly rewritten to the actual domain, but not the home_url() and the first navigation entry (maybe also home url property?). For these links always the in the database saved home_url is shown.

    When I update these property in the database nothing happens, but when I save the Polylang settings again the correct urls are shown. It seems to be that it is related to the rewrite rules.

    But this does not solve the main issue because the home_url is in every case the same domain and not the actual one configured in the domain mapping.

    I am not sure, what is the main cause of this issue. Can you check?

    Regards

    http://wordpress.org/plugins/polylang/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Chouby

    (@chouby)

    Since Polylang 1.3, home urls are stored in DB to avoid re-evaluating them at each page load. So that’s maybe the origin of the issue. There is something that is not clear. Does saving the Polylang settings solve the issue (this should reset the home urls cache)?

    Thread Starter nima1

    (@nima1)

    Hello Chouby,

    when I change the home url property manually in the settings of the site and resave the Polylang settings the new domain is shown correctly.

    But of course you had to decide for one domain multi domain does not work any more which is not good. For example when you have a multi site installation with internal and external sites there are now many problems.

    Maybe you can integrate an option or do not safe the domain (only path) in general?

    Plugin Author Chouby

    (@chouby)

    I am sorry but I still don’t understand what is the issue. What’s wrong once you have saved the settings for a site? You can do it for other sites too. Am I wrong?

    Thread Starter nima1

    (@nima1)

    Hello Chouby,

    the problem is, that the complete domain mapping does not work any more. When you have a multi site installation with multi domains for a site only one is working now. Before you can reach the site with every domain and all links were rewritten to the domain the user opened in the browser.

    WP Domain Mapping is managing multi domains for one blog/site.

    Is it more clear now?

    Plugin Author Chouby

    (@chouby)

    I am sorry πŸ™

    Let’s say you have 2 websites in 2 languages each.
    Home urls for the first should be:
    site1.com/en/
    site1.com/fr/
    Home urls for the second should be:
    site2.com/en/
    site2.com/fr/
    Is it what you expect?

    You wrote that’s OK once you saved Polylang settings for site1. what happens oncee you do the same for site2?

    Thread Starter nima1

    (@nima1)

    Hello Chouby,

    the problem is not related to the Polylang functions.

    The problem is that Polylang rewrites the urls only to the specified domain in the home url property. This problem only occur when you use some multi site functions and the domain mapping plugin so with multi domain for one blog.

    Example:

    Multisite Installation with 2 Blogs
    Blog 1 has 4 domains
    Blog 2 has 1 domain

    Before the update yo can reach the complete blog with every domain specified in multisite domain mapping for example blog1.com, blog1.org…
    The domains are not related to languages, it is a general function.

    Now only one domain is working correct because all links in the site with home url are rewritten to the specified link in the database. When the user click such link it is on another domain.

    For Blog 2 there is only one domain so there is no problem

    Is it more clear now?

    Plugin Author Chouby

    (@chouby)

    Yes. I believe I understood this time. Sorry I was stuck believing there was only one domain per site.

    I propose you to try the development version (1.3.1.1)
    http://downloads.wordpress.org/plugin/polylang.zip

    Then you go in wp-config.php (or alternatively you can create a file wp-content/polylang/pll-config.php) and set this new constant:

    define('PLL_CACHE_HOME_URL', false);

    Thread Starter nima1

    (@nima1)

    Hello Chouby,

    Thank you, I will check soon and let you know.

    Thread Starter nima1

    (@nima1)

    Hello Chouby,

    sorry for the late reply. I have checked the new version with the constant and it is working without problems now.

    Thank you very much.

    Plugin Author Chouby

    (@chouby)

    Polylang 1.4 was just released (including this modification of course) πŸ™‚

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘WordPress 3.8 with WP Domain Mapping url issue’ is closed to new replies.