Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#676 2008-03-13 22:08:12

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

I upgraded to 4.0.6, using Maniquí’s txplib_db.php as posted here.

  • as far as I know I did not get those errors
  • snippets seem to work fine
  • <txp:l10n_lang_list /> works

In short, I haven’t encountered any problems at all :)

Offline

#677 2008-03-14 00:48:52

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

That’s good news. Thanks, Els!

Offline

#678 2008-03-14 03:03:09

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

I got the same initial results that FireFusion got after I upgraded, then logged into Textpattern:

A problem occured while loading the plugin: l10n -> Warning: 
array_key_exists() [function.array-key-exists]: 
The second argument should be either an array or an object on line 553
A problem occured while loading the plugin: l10n -> Warning: 
array_key_exists() [function.array-key-exists]: 
The second argument should be either an array or an object on line 553
A problem occured while loading the plugin: l10n -> Warning: 
Cannot use a scalar value as an array on line 1421

I also get these messages in the diagnostics tab:

Pre-flight check
Some Textpattern files are out of date:
/include/txp_file.php,
/include/txp_prefs.php,
/lib/taglib.php 
Some Textpattern files have been modified:
/include/txp_category.php,
/include/txp_form.php,
/include/txp_import.php,
/include/txp_link.php,
/include/txp_preview.php,
/lib/IXRClass.php,
/lib/admin_config.php,
/lib/class.thumb.php,
/lib/constants.php,
/lib/txplib_db.php,
/lib/txplib_update.php,
/publish/log.php,
/publish/search.php,
/update/_to_4.0.3.php 

Are these preflight results normal or is something wrong?

Offline

#679 2008-03-14 11:28:47

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

Strange that you all get those error messages, and I did not? So maybe they were there, but I just didn’t notice? Anyway, in my install MLP seems to work exactly as before the upgrade.

Those diagnostics look like you didn’t upload the right files, I don’t think it has anything to do with MLP. The only pre-flight check related to MLP you should get is “Some Textpattern files have been modified:
/lib/txplib_db.php”.

Offline

#680 2008-03-15 13:33:10

rainer
New Member
Registered: 2008-03-15
Posts: 8

Re: MLP - The Multi-Lingual Publishing Pack

Hi all,
I’m new to TXP so I’m a bit lost as where to look for the solution to my Problem with the MLP – so I’d be glad if someone points me to the right debugging procedure. I installed the MLP on TXP 4.0.6 and everything seemed to be fine except a warning for the outdated txplib_db.php. I first ignored it and put everything in place for a two-language-site.

Now, whenever I go to the root of the site using only http://mercedes-scharf-feldenkrais.net/, the URL gets redirected to http://mercedes-scharf-feldenkrais.net/es or /de, putting all the renditions of the specified language on one page. No matter how I set the URL-scheme, the result is always the same. So I tried the modified txplib_db.php from this thread, and was hoping that it would fix things but had no luck. So how do I get to the right page (http://mercedes-scharf-feldenkrais.net/de/Startseite) ? Do I have to do a fresh install, or might there be a magic trigger I could pull to set things in order?

any help appreciated…

Offline

#681 2008-03-15 20:40:52

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Welcome, Rainer! That’s a good question.

I think the answer is #587, which is about half way down this page:
http://forum.textpattern.com/viewtopic.php?pid=169701

I’m also curious about the problem. As I understand it, if you type in an address without a language folder, you’ll be directed to a URL with the language folder automatically. That’s just the way it works for most pages now.

I’m not sure about this, but I thought that the different language renditions of articles were supposed to be given different titles. If so, in clean URLs mode, having the language folder in the URL would not be important. (Preliminary trials show that the MLP works fine with the same URL (like “index”) for more than one language.

It does seem that not using the language marker in URLs can cause problems. One link on my site which doesn’t have the language marker does fail (404, page not found) frequently, about 10% of the time. But, if the URLs for the different languages aren’t diffferent, this would almost certainly cause problems.

In that post I mentioned, Steve seems to be planning to allow us to turn off the insertion of the language marker. Perhaps Steve can verify this and the potential problems of not using them?

[edited to update my experience with URLs]

Last edited by azw (2008-04-01 06:35:47)

Offline

#682 2008-03-15 20:45:54

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Does anyone know a way to offer different language renditions of the error_default page?

Because there are no renditions of my error_page, MLP doesn’t know what to offer. The error page as it is now is totally controlled by a page template with snippets, which show the text versions for each language. I’d like people to be able to choose the version they see.

Offline

#683 2008-03-16 08:58:12

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

Anyone know why you can verify an MLP site with Google Analytics?

Offline

#684 2008-03-16 15:31:04

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

Re: MLP - The Multi-Lingual Publishing Pack

azw wrote:

Does anyone know a way to offer different language renditions of the error_default page?

Haven’t tried, but I think you could use MLP conditionals (if_language) and also, manually hard-code the language switcher in the same place it would placed if output by the MLP langlist tag.
If the lang list is on a form that is called by the page template, you can use txp:if_status to output a different lang switcher when there is a error page.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#685 2008-03-17 02:49:05

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

If the lang list is on a form that is called by the page template, you can use txp:if_status to output a different lang switcher when there is a error page.

That’s an interesting idea, Maniqui. Do you have an example of what the code would like like?

By the way, I’m wondering if my initial idea is going to be overly complicated On my error page, the page shows an explanation of the problem. If you were to click on a link for a different language, I don’t think it would automatically know what the error description was. Of course, we could use PHP to send this information to the next page.

Vaya, Julian, escribe en inglés mucho mejor que puedo escribir in castellano. ¡Su habilidad me causó muy buena impresión!

¿Qué significa “maniqui”? ¿Puppet?

Last edited by azw (2008-03-17 02:49:36)

Offline

#686 2008-03-17 12:42:27

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

Re: MLP - The Multi-Lingual Publishing Pack

I was thinking in something like this in the txp form that outputs your lang list bar:

<txp:if_status status="404">
<ul>
<li><a href="<txp:page_url />">English</a></li>
<li><a href="<txp:page_url />">Español</a>
</ul>
<txp:else />
<txp:l10n_lang_list current_class="active" language_class="short" link_current=1 />
</txp:if_status>

I haven’t tested it, so I don’t know what will be the exactly output of <txp:page_url />.
Also, I don’t know if txp:if_status support multiple status values.
Of course, that won’t be a problem if you don’t need/want to use the same txp form for your lang list navigation.

A “maniquí” es more like a showroom dummy. :)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#687 2008-03-17 12:44:35

rainer
New Member
Registered: 2008-03-15
Posts: 8

Re: MLP - The Multi-Lingual Publishing Pack

thanks azw,

I solved it with the help od f your post, using mod_rewrite, pointing the http://domainname.tld/es to http://domainname.tld./es/Startseite – but it’s rather a quick and dirty workaround than a fullblown solution. I am still wondering why it happens in the first place. Shouldn’t it be default behavior to point to the respective startpage in every language? but for now, I’m good.

Offline

#688 2008-03-17 19:08:18

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Thanks, Maniqui, I’ll play with that.

Rainer, I’m sorry: I misunderstood your needs. I think the main problem is that you want your principal page to not something different from what Textpattern and your web server think is your “home page”. In almost any website, if a visitor goes to a URL which is just the raw domain name ( like www.yourDomainName.com ) they usually go to index.html or home.html or similar equivalents, like index.htm, index.php, etc. Settings on the web server determine what will be considered the home page.

In contrast, you’ve given your principal page a different name. I’m pretty sure that MLP and Textpattern make assumptions about what will be your home page, but you’d be having the same trouble with almost any web server. In other words, what you want to do is not normal.

Your solution halfway fixes the problem but I don’t think it’s a good solution. I’m not sure what the consequences would be for your Google rankings, but that could be negative. In addition, it’s confusing to visitors, and it’s unnecessary work for the server. I recommend against it.

The content you display on your Startseite page can be on the index page (I think this is index.php in Txp, but it’s what appears if you go to your URL). What you probably want to do is to have a static home page. You could create another page that displays the info that would have been shown on the home page.

Here are a couple of links that talk about static pages. (I think I’ve seen other good ones, too.)
http://thresholdstate.com/articles/3667/managing-static-pages
http://textbook.textpattern.net/wiki/index.php?title=Making_an_Article_Static_and_Top-Positioned

Txp really should allow us to choose which page will show that information. It’s not as easy as it could be.

Hope that helps!

Offline

#689 2008-03-30 12:10:19

beatfreak
New Member
Registered: 2006-03-02
Posts: 8

Re: MLP - The Multi-Lingual Publishing Pack

I’ve found a small problem with the <txp:l10n_lang_list /> tag.
Ampersands are not converted to &amp; in url’s so there is a problem with the validation of the page.

You can see the problem live here: http://www.plotstrips.be/magazine/?e=issueindex&issue=2

Last edited by beatfreak (2008-03-30 12:11:02)

Offline

#690 2008-04-01 00:39:39

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

I’ve noticed that Txp (or the server?) occasionally has trouble with accessing sections in which there is only one static page. If someone tries to go the a URL that looks like:

www.domain.com/section/

instead of:

www.domain.com/section/page-address

sometimes (not always) they’ll get a 404, page not found error. Other times, the page appears just fine.

Note that the language marker (/es for Spanish or /en for English) do no appear in these URLs. Adding them usually fixes the problem. But some visitors don’t use them, particularly search engines.

I’m considering whether to rename these static pages:

index

instead of the current addresses which are derived from their titles. Will have have any problems if I do this?

The same page in each languages would all have the same name. Is that a problem?

Last edited by azw (2008-04-02 07:36:21)

Offline

Board footer

Powered by FluxBB