Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

lloydo3000 on "Polylang breaking static front page on new WP 3.5 installation"

$
0
0

Thanks for your reply again Chouby.

This is the expected result. If you unselect the option 5, then http://127.0.0.1:4001/wordpress/ will always redirect to the front page in the preferred language (or the default language). Now selecting the option 6 just means that your front page url is no more http://127.0.0.1:4001/wordpress/sample-page-in-english/ but http://127.0.0.1:4001/wordpress/en/ and that this later url will no more display the archive of posts in English.

OK I tried this and it sort of worked for English, which I had set in the Polylang settings as default. I was confused by the wording. When you say default, do you mean what I set as the Polylang default language, or the language of the visitor's computer?

E.g. if a French person visited the website then their default language is French (from their computer/browser). And since I have asked Polylang to set the language from the browser, it should want to display French. So is the preferred language French now? Or is the preferred language set when their Italian friend uses their computer, and clicks the IT flag to display the site now in Italian? Maybe it would be good to clarify the terms used to describe the set language. An idea:

+============================================+
|      Language definitions in Polylang      |
+============================================+
| TERM       DESCRIPTION                     |
| ------------------------------------------ |
| Base       Language from Polylang Settings |
| Default    Language set from browser       |
| Preferred  Language set by user action     |
+============================================+

I was hoping that whenever a language was chosen, the URL would appear without language notation (i.e. without referring to the language). Although I guess it doesn't matter too much to have /es/ there... of course having every page working is more important!

Did you translate your home page in English to Spanish? If yes, it should display the static front page in Spanish.

I have two sets of test pages from the WP 3.5 installation, the Sample Page and the Contact Us page, both in EN/ES/FR/IT. But here was my error: after I uninstalled 0.9.8 and installed 1.0dev13, I set these pages to their correct languages, but I didn't update the links between them (Polylang didn't know which page was related to the other).

Now I fixed that, everything is working better! And I have just realised that I must set up individual menus for each language (beforehand, I presumed that language switching was automatic, i.e. if you clicked on a flag, then subsequent browsing would always redirect you to pages in that language).

So I have just set up another three menus in French/Italian/Spanish and told Polylang to use them. Now navigating to http://127.0.0.1:4001/wordpress/ just gives the two PHP errors I posted originally!

Navigating to http://127.0.0.1:4001/wordpress/en/ brings up the 404 page, but in Italian (probably set from the last page I was viewing). Other pages in the Italian menu worked, such as Contact Us IT. I was also able to switch to Contact Us ES/FR.

Clicking the English flag, expecting to go to Contact Us EN (http://127.0.0.1:4001/wordpress/contact-us/) instead took me to http://127.0.0.1:4001/wordpress/<strong>english</strong>/

I went back to the Polylang Languages page and sure enough, the code for English had magically changed itself from en to english! I remember this happening to me with 0.9.8 as well, but I can't remember exactly how. My guess is something happens when one of the Polylang settings pages is saved (incidentally, you don't display the yellow messages at the top like in the rest of WP does to confirm a successful action).

Maybe english is hard-coded somewhere? I cannot think of how it got there otherwise, I just used the drop-downs to make the languages. (I'd prefer to use en_GB but I gather it isn't available on WP). Oh, unless it is the menu slug? One of the 4 menus is called English.

Anyway, after fixing the slug back to en the homepage loads again, but it loads the Sample Page ES. This is the page I specified in Reading settings, but beforehand I was being successfully redirected to Sample Page EN... strange.

Update: After the upgrade to 1.0dev14, this problem is gone. Who knows if/when it will return!

I am not sure what I should display in that case.

Since Polylang knows which language the user requested, maybe an error message in their language? You could provide a list of the languages available for that page, and even an online translation? Maybe:
Sorry, the content you requested is not available in XXX language. You may choose from these currently available languages or try a machine-translated version.

I just downloaded 1.0dev14 to test. It made me think, what is the preferred way to keep the relationships between pages when upgrading or migrating a WP installation?

They should always be displayed in the order you created them whatever the version used. At least it is what I observe on my test site with both 0.9.8 and the development version.

I've just installed 1.0dev14, and added the 4 languages in alphabetical order. On the Languages page they are in the correct order, but everywhere else in the dashboard, they are now in the order 3/ 4/ 1/ 2/ ... totally random!

I already noticed this issue appeared in 1.0dev13 and came back to the previous situation in the current development version 1.0dev14

That's good, however it would be even easier to understand if the subsequent check boxes were disabled until the first was checked.

I'm really grateful for your work on this, and your replies. I am sorry I write such long ones, but I'm trying to be specific and helpful!

Cheers,
Lloyd


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>