Textpattern Forum

You are not logged in. Register | Login | Help

#1941 2012-02-14 14:22:43

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,399

Re: MLP - The Multi-Lingual Publishing Pack

elwins wrote:

….Anyway its important or not so importang bug?

Don’t worry, this is a very minor bug not MLP related which shows only the first time you log in to the txp interface.

Last edited by redbot (2012-02-14 14:24:27)

Offline

#1942 2012-02-20 10:52:27

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 109
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi again !…

every thing seems to work for now except some path related issue :
the site i’m working on has 2 languages : French and English.
Let’s say i’m accessing the site at a second level url (my-site.com/my-section) with non-french language set in my browser
I will see the right page (ie: english rendition) but the url is not set to my-site.com/en/my-section, it is still my-site.com/my-section.

And this error message show :
Notice: Undefined index: l10n_request_uri in site_directory\textpattern\lib\txplib_misc.php(653) : eval()'d code on line 430
It’s on my development server with status set to debug.

I can understand that it may not be a problem from the plug-in point of view but how can i set a redirection with header 301 moved permanently for all previous French content to my-site.com/fr ?
Would it be possible to add an .htaccess rule for the whole site ?

Thanks for any advice.

Offline

#1943 2012-02-20 12:37:27

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,388
Website

Re: MLP - The Multi-Lingual Publishing Pack

planeth wrote:

Let’s say i’m accessing the site at a second level url (my-site.com/my-section) with non-french language set in my browser I will see the right page (ie: english rendition) but the url is not set to my-site.com/en/my-section, it is still my-site.com/my-section.

If you just type ‘my-site.com/my-section/’ in the URL bar, that is expected behaviour. As soon as you navigate using the MLP generated links, the language marker should appear in the URL again.

Notice: Undefined index: l10n_request_uri in site_directory\textpattern\lib\txplib_misc.php(653) : eval()'d code on line 430

Is the site installed in a subdirectory?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#1944 2012-02-20 13:33:27

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 109
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi Els,

If you just type ‘my-site.com/my-section/’ in the URL bar, that is expected behaviour. As soon as you navigate using the MLP generated links, the language marker should appear in the URL again.

I understand it is expected. My concern is about SEO, actually.
People (and robot) accessing this link will see different content depending of the browser default language. Which will lead to duplicate content in google “machinery”.
That’s why my question about setting a .htacces directive to redirect to the french url with a 301 header.

Is the site installed in a subdirectory?

No.

Offline

#1945 2012-02-20 13:51:54

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,388
Website

Re: MLP - The Multi-Lingual Publishing Pack

planeth wrote:

It’s on my development server

Are you sure the server configuration couldn’t be interpreted as a subdirectory? Have a look at this post. The only two references to this error I could find are about sites in subdirectories. MLP is known not to work in subdirectories, so if this is the cause, the only way to solve it is to change the setup. A subdomain would be fine.

That’s why my question about setting a .htacces directive to redirect to the french url with a 301 header.

I’m not so sure this is necessary, why would these URLs without language markers ever be requested? Unless they existed previously of course.


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#1946 2012-02-20 14:07:42

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 109
Website

Re: MLP - The Multi-Lingual Publishing Pack

Unless they existed previously of course

Yes, in fact. I forgot i stated it in a previous post.
This is a site which has been online for a few years now and my client wants to go multi-languages.
So, yes url without language exist. And of course my client sure does not want to loose his positions in the google SERP

Are you sure the server configuration couldn’t be interpreted as a subdirectory?

Yes it could be. I’ve checked the post you linked but it does not make much sense for me.
I’m running my local server in a XAMPP stack and have set this site according to the wiki install guide, with a <VirtualHost> directive

This is the debug message when debug is set to 1 in _l10n_process_url ()

hu=http://local.lesbacchanales.com/ REQUEST = GET :

string '/cuisine/' (length=9)


array
  'u0' => string '' (length=0)
  'u1' => string 'cuisine' (length=7)
  'u2' => string '' (length=0)
  'u3' => string '' (length=0)
  'u4' => string '' (length=0)


L10N MLP: Public - Checking URL (/cuisine/), LANG = fr-fr
L10N MLP: Checking start of path for language ... cuisine
L10N MLP: expand_code(cuisine) returned

null


L10N MLP: no-match branch

Checking browser accept-language headers.


L10N MLP: processing browser language header :

string 'en-GB,en;q=0.9,da-dk;q=0.8,da;q=0.7,de-de;q=0.6,de;q=0.5,en-us;q=0.4,fr-fr;q=0.3,fr;q=0.2,fr-fr;q=0.1' (length=101)

Setting language to en-gb from browser headers


_l10n_set_browse_language( en ) ... $site_langs=

array
  0 => string 'fr-fr' (length=5)
  1 => string 'en-gb' (length=5)

, $tmp='en-gb' ... in IF() ... $tmp [en-gb] used to set $l10n_language to

string 'en-gb' (length=5)

returning TRUE

Input='en', Site Language set to

array
  'short' => string 'en' (length=2)
  'country' => string 'GB' (length=2)
  'long' => string 'en-gb' (length=5)

Returning

boolean true



New first path is: cuisine

Offline

#1947 2012-02-20 14:35:44

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,388
Website

Re: MLP - The Multi-Lingual Publishing Pack

planeth wrote:

So, yes url without language exist. And of course my client sure does not want to loose his positions in the google SERP

In that case I understand :) If you don’t have too many sections you could do something like this for each section in .htaccess:

Redirect permanent /cuisine http://site.com/fr/cuisine

which will redirect not only /cuisine/ to /fr/cuisine/, but also all other pages in that section. So for instance /cuisine/article-title will go to /fr/cuisine/article-title.
I guess it’s possible to catch all URLs without language marker using regular expressions, but I’m not good at that ;) If you need help with it, you’d better start a new topic in the How do I forum (where it will attract more attention).

This is the debug message

I’m not technical enough to be able to tell you what the debug output means, but my guess is that the error will disappear once you have moved the site to its live location. If it’s working otherwise, I’d ignore it for now if I were you.

Last edited by Els (2012-02-20 14:36:41)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#1948 2012-02-20 14:52:22

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 109
Website

Re: MLP - The Multi-Lingual Publishing Pack

Thanks a lot Els for your helpful answer.

And yes, i think i’m gonna go with Redirect permanent , there’s not too many section and i guess it will be much faster than regex.

my guess is that the error will disappear once you have moved the site to its live location. If it’s working otherwise, I’d ignore it for now if I were you.

Yes, that’s a very wise advice :) My bet is also things will smooth out once going live.

Last edited by planeth (2012-02-20 14:52:50)

Offline

#1949 2012-02-29 11:05:19

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 109
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hello (once) again,

this is a comment on what went wrong when going live with MLP.
On the production server, the setup wizard did not create tables for english – the site is french by default.
On admin side the 2 languages where updated.
I did an ugrade (shame on me, i wasn’t running Txp latest version) to no avail.

Finally, I manually edited the ‘al10n_l10n-languages’ entry in txp_prefs table, run once more cleanup/setup wizard and obtain all the right tables.
Is this a known issue of MLP setup wizard not setting the installed languages ?

Offline

#1950 2012-04-07 10:42:10

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 200
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi all,

Some years ago i made a tri-lingual site for a .nl based arts institution. As budgets are tight these days they want to skip one language. What would be the best MLP practice to do that?

Either remove all articles for that language in MLP and remove the MLP preference for that language, or only do the last. In that case all links are invisible but the articles stay in the database (maybe preserved for better times). Or do they mess up the article list when the MLP lang preference is removed?

I also have to update MLP and txp to 4.4.1. Remove lang before or after updating?

kees

Last edited by kees-b (2012-04-07 10:43:24)

Offline

Board footer

Powered by FluxBB