• Hi Chouby,

    After updating Polylang on a multisite installation to the new 1.7, I get the following issue:

    One site uses the option “Language is determined by different domain names” in combination with a Domain Mapping plugin to manage domain requests landing on the correct site. This has been working up ’till now but after the update.

    At first, all language front pages (including the default) simply showed no posts. After saving the Polylang Settings tab again, the default language front page started showing all correct posts again. But the other two are still empty as if there are no posts in that language.

    I switched Polylang to “Language is determined by subdirectory” and all front pages started working fine. Back to different domains, the issue is back too.

    Resaving Permalinks did not help.

    Unchecking the option to remove the page slug from the front pages solved it in so far that now my front pages show the slug which is not ideal for me. Plus landing on the root of the site does not redirect to the address with slug.

    Checking the option to remove page slug again, I notice that the menu item “home” for each of these transtations (again, not the default) remains at the address with slug. And yes, the pages are rendered correctly on the url with slug. But they don’t redirect to the root like they did before. And root still shows no posts…

    Complicating factor (apart fom being multisite with domain mapping plugin) might be that these front pages are regular pages, not blog pages, each using a template to list the latest posts of the post type “Portfolio”. It is the Illustratr theme (by Autommatic) that adds this post type.

    You can see it happening on http://phareo.fr … the other two front pages should be on http://phareo.eu and http://nl.phareo.eu but they are actually on http://phareo.eu/portfolio-en/ and http://nl.phareo.eu/portfolio-nl/ while the default front page address with slug http://phareo.fr/portfolio/ seems to render a blog page now instead of redirecting to / …

    https://wordpress.org/plugins/polylang/

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Fantastique!

    So… what does the Polylang Cache do?

    Plugin Author Chouby

    (@chouby)

    Sorry, I forgot to answer.

    I store the list of languages objects in a transient to avoid some db queries and other operations (such as flag image encoding since 1.7). The language object includes the home url in the corresponding language. But this is not compatible with websites accessible from more than one domain (as only one domain is cached). Thus when the option ‘PLL_CACHE_HOME_URL’ is set to false, the home url is evaluated as each page load.
    When I saw your site still accessible (and apparently working correctly) from all your domains, I thought you used this option.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Ah, OK transients… This may be related then to an issue with W3 Total Cache (which I’m using on that multisite) that I encountered with one of my own plugins where I’m trying to store a transient. You can read a discussion on https://wordpress.org/support/topic/suggested-changes-to-object-caching-and-transients where I share my current (but unsatisfactory?) work-around. Hoping there is a better way.

    Plugin Author Chouby

    (@chouby)

    Yes. I believe that you are right. I was not aware of this issue in W3TC.

    I did not ran into the issue during my own tests because I don’t use cache plugins and keep Polylang cache constants to true for tests. Thus, the language objects are always evaluated on admin side and “read only” on frontend.

    In your case, the transient expired on a frontend page which revealed the bug (which I could reproduce by removing the home urls from the cached language objects).

    Did you finally apply the workaround you mentionned in your own plugin? Would’nt it be simpler to directly use an option instead?

    That’s rather disappointing not being able to use a non expiring object cache.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    I’m using the work-around in a custom theme at this point. I suppose simply storing it at an option would be possible too but the data stored realy is transient. I’m using a 24h expiration and I did not want to go into a custom time-stamp kind of solution to ‘manually’ refresh the option value every 24 hours…

    Plugin Author Chouby

    (@chouby)

    I understand. In Polylang, there is no expiration. But I will keep things as they are as I guess that other object cache plugins could handle correctly transients with no expiration.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘No posts on home pages with "language determined by domain" in 1.7’ is closed to new replies.