Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#457 2007-11-19 18:49:26

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: MLP - The Multi-Lingual Publishing Pack

I have just encountered the following problem after the upgrade to the latest pack (site running on TXP 4.0.5, PHP 5): when I clone an article, and work on the new rendition, the url of the new rendition will be changed to reflect the newly translated article. E.g.: I have an article in Hungarian entitled “utca”, I clone it, translate it into English, “street”, and lo, the url of this latter changes to “street”. The problem is that when one goes to http://site.url/hu/section/utca and clicks on the language switch, it points to http://site.url/en/section/street instead of http://site.url/en/section/utca. And obviously it directs the visitor to error 404… can somebody help me on this, please? Thank you very much in advance!

Offline

#458 2007-11-20 06:50:51

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

zoltandragon wrote:

I have just encountered the following problem after the upgrade to the latest pack (site running on TXP 4.0.5, PHP 5): when I clone an article, and work on the new rendition, the url of the new rendition will be changed to reflect the newly translated article. E.g.: I have an article in Hungarian entitled “utca”, I clone it, translate it into English, “street”, and lo, the url of this latter changes to “street”.

I think this is Txp 4.05, not the MLP pack.

Even in a normal Txp 4.05 installation (no MLP), the url-only title is updated whenever you edit the title of an article — as long as the article hasn’t been published with ‘live’ status. If I create a new draft article in Txp4.05; edit the title; then save/publish — I can see the url-only title keeps changing until I set its status to ‘live’. After that, the url title doesn’t track changes to the article’s title.

As the MLP Pack clones renditions into ‘draft’ status then the url-only title will change as you translate your rendition’s title until you published it with ‘live’ status, then the changes to the url should stop. For myself, this is what I would expect to happen.

If you want to set the url back to ‘utca’, just edit your rendition, look for the ‘url-only-title’ in the advanced options and set it to ‘utca’, publish and all should be well. It shouldn’t change any more.

The problem is that when one goes to http://site.url/hu/section/utca and clicks on the language switch, it points to http://site.url/en/section/street instead of http://site.url/en/section/utca.

Yes, I would expect that to happen as the links are generated from the url-only titles that were set as you edited the renditions.

However, it sounds like you are expecting the urls to be constant across renditions. If you want the url for the English rendition to include the word ‘utca’ then you will either need to edit the ‘url-only’ title (as above) or translate the body/excpert/fields first. When you are happy, set status to live and publish (thus setting the title to ‘utca’) then go in and finally translate the rendition’s title.

Phew, hope that makes sense.

And obviously it directs the visitor to error 404… can somebody help me on this, please? Thank you very much in advance!

That’s not obvious to me and it certainly shouldn’t be giving a 404 error. I’m looking into this now.

Can you show me you form/page where you have included the l10n_lang_list tag please?


Steve

Offline

#459 2007-11-20 08:02:35

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

That’s not obvious to me and it certainly shouldn’t be giving a 404 error. I’m looking into this now.

Ok, I created an Español article titled ‘Casa’ and published it in my blog section. It was automatically given a url-only title of ‘casa’.
I then cloned it to English, changed the body a little, translated the title to ‘House’ and published it live. It was given the url-only title ‘house’

I then visited my Español blog section and could see the Casa rendition in the blog section’s article list. Clicking on its title took me to the es/blog/casa rendition. There I could see the link to the English rendition of the article. Hitting this produced no errors — it took me straight to the en/blog/house rendition.

This was on a Txp4.05 / php 5.2.3 install using a section/title clean url mode with English, Ελληνικά, 日本語 and Español installed.

The language list, for that article, is correctly producing…

<ul class="l10n_lang_list">
	<li class="en-gb"><a href="http://mlp405.local/en/blog/house"><span dir="ltr">English (GB)</span></a></li>
	<li class="es-es l10n_current"><span dir="ltr">Español</span></li>
</ul>

… on the Spanish rendition and …

<ul class="l10n_lang_list">
	<li class="en-gb l10n_current"><span dir="ltr">English (GB)</span></li>
	<li class="es-es"><a href="http://mlp405.local/es/blog/casa"><span dir="ltr">Español</span></a></li>
</ul>

… on the English one.

Last edited by net-carver (2007-11-21 14:36:47)


Steve

Offline

#460 2007-11-20 18:52:13

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

All

Just posted an update (l10n.0.7.631.txt) to the l10n plugin to the MLP pack’s page (not the whole pack) that extends the l10n_lang_list tag so that it can output good language switching lists in category list pages.

As far as I can tell, this is different to zoltandragon’s problem above.


Steve

Offline

#461 2007-11-20 19:22:59

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: MLP - The Multi-Lingual Publishing Pack

Steve, thanks for your suggestions and for being such a help – I’ll think about it and experiment a little to see how it works.

Offline

#462 2007-11-22 17:23:02

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

All

just to update you. Here’s the current state of my development build…

Problem Comments Status / Changes
Incorrect url’s output by l10n_lang_list links for both category and author article lists. These caused 404 errors. This was reported here a long, long, time ago by guiguibonbon Fixed — added needed translation to the URL ‘author’ and ‘category’ fields.
Un-needed ‘1’ in the reported list of needed privileges by the setup wizard. Only seen if your DB user doesn’t have privileges needed to install and run the pack. Fixed by writing a custom routine to handle MySQL privilege reporting and override.
No way to bypass setup wizard privilege checks Sometimes occurs when setup wizard cannot correctly detect privileges — leaving user blocked from installing the pack. Fixed by writing a custom routine. This now allows you to re-test privileges (optionally with additional output) or totally skip the privilege checks and continue with the setup wizard.
Installation fails to insert l10n_lang_list tag into Txp4.0.5’s default forms Txp 4.0.4 is fine. Fixed. Updated the setup routine to correctly detect 4.0.5’s default forms.
Edit HTML Character Encodings being dropped by the snippet editor Exiladler posted about this. It was leading to xhtml validation failures Fixed
Admin language switcher: doesn’t work on Txp4’s development version Txp 4.0.4 and 4.0.5 are fine, Crockery untested as yet Edit Fixed — added insert points for dev/4 branch
Edit Admin language switcher: may not work with admin tab area mods If you use a modified txplib_head.php file as part of a mod for the admin interface you’ll probably loose the admin-side quick language picker. Fixed — will now insert at the foot of the page too. Works in 4.0.4/4.0.5 and 4/Dev branch
Edit Admin language switcher: language list order jumps around. Fixed — list is now sorted

…grab it from the txp-plugins download page

Last edited by net-carver (2008-01-07 05:29:21)


Steve

Offline

#463 2007-11-22 17:42:14

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: MLP - The Multi-Lingual Publishing Pack

Great to know what is happening behind the curtains!
Steve, it seems you have been charging your batteries and now you’re full of energy (Kraftwerk dixit).

What about the feature I asked? ;)

To have the option to localize section names. I think this ability can improve both human readability (specially for those that don’t understand the main language) and SEO.
So, you can have urls like:

/services/my-services
/servicios/mis-servicios

/about/
/acerca-de/

Do you think it’s possible?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#464 2007-11-22 18:26:22

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

What about the feature I asked? ;)
To have the option to localize section names. I think this ability can improve both human readability (specially for those that don’t understand the main language) and SEO.

I partly agree with this, so long as the output URL is transliterated.

For sites using languages with character sets matching the unreserved URI character set then yes, this could lead to more readable URLs. For other characters, the URI requires the use of percent encoding. (See the Wikipedia percent encoding page for more details.)

A site visitor’s experience of such URLs can vary depending on how the browser presents the URI string to the user — either encoded or unencoded.

One way to prevent the need for percent encoding is to dumb-down or transliterate the strings used in URLs — and this is the approach taken with URL-only titles used by Textpattern articles.

However, in the case of category and author lists, Textpattern doesn’t dumb-down the URL but does use percent encoding. This might significantly worsen the URL from a human readability point of view (unless presented un-encoded) but you wouldn’t ever want anyone to read one over the telephone for you to type in!!!

Here’s an example of what I’m talking about: This is how FF presents the URL of a Greek category link to me as I mouse-over it…

And this is what appears in the URI box when I click the link… http://mlp405.local/el/%CE%9A%CE%B1%CF%84%CE%B7%CE%B3%CE%BF%CF%81%CE%AF%CE%B1/Possibly-Junk

So, you can have urls like:
/services/my-services
/servicios/mis-servicios
/about/
/acerca-de/
Do you think it’s possible?

I think that, subject to either dumbing down or percent encoding, generating language specific URLs will be possible. I’m already doing URL re-writes so going a step further should be possible, especially if Graeme re-surfaces.

However, the problem might come with how Txp processes those URLs and if the MLP Pack can transform them back into something it’s expecting, before Txp actually gets to processes it.

It’s that part I don’t know about yet. Edit Yes, it should be possible as the pack already intercepts the URL and strips the language marker from it.

Last edited by net-carver (2007-11-23 02:12:56)


Steve

Offline

#465 2007-11-22 18:39:10

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

Maniqui

Just a thought: could you use a different permenant link mode — one that doesn’t bother including the section at all (like title-only, date/title or id/title?) Then your URL wouldn’t face a section translation challenge.

Goodnight.


Steve

Offline

#466 2007-11-24 07:42:09

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: MLP - The Multi-Lingual Publishing Pack

Sorry to raise a very trivial matter but I am currently trying to insert &amp; into a snippet as my text doesn’t validate correctly due to the use of the & inside it and whatever I do, it will not save it. Not even giving me an error message. Haven’t updated following the recent improvements, so currently on 0.6.600

thanks for a great plugin, taking txp to another dimension for me

regards
Peter

Offline

#467 2007-11-24 11:42:50

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

Exiladler wrote:

Sorry to raise a very trivial matter but I am currently trying to insert &amp; into a snippet as my text doesn’t validate correctly due to the use of the & inside it and whatever I do, it will not save it. Not even giving me an error message. Haven’t updated following the recent improvements, so currently on 0.6.600

Hello Peter, thank you for the feedback.

I’ll check this out some more but my immediate testing is showing that it’s working fine for me here. I can enter the string &amp; into a snippet and it stores and gets rendered just fine for me.


Steve

Offline

#468 2007-11-24 11:50:33

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: MLP - The Multi-Lingual Publishing Pack

Steve,

Thanks for the quick feedback and checking this, I’ll update to your latest version.

For your info, here is what I am running on

Textpattern version: 4.0.5 (r2466)
MySQL: 5.0.27-standard
Apache/1.3.37 (Unix) PHP/5.1.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
Linux 2.6.18-ovz028stab039.1-smp

Will report back after upgrading your plugin.

Regards
Peter

Offline

Board footer

Powered by FluxBB