Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#673 2008-03-11 18:03:06

brunodario
Member
From: Belo Horizonte, Brasil
Registered: 2007-09-19
Posts: 75

Re: MLP - The Multi-Lingual Publishing Pack

Hi there. I just finished a bi-lingual website wich uses de MLP with TextPattern v 4.0.5. But i´m still having the problem i´ve related here

The problem is that both <txp:newer> and <txp:older> doesn´t return anything on an article page and on an individual article page.

In example: <txp:newer>Previous</txp:newer> <txp:older>Next</txp:older> returns a blank space on the site code, even if the article form has reached the limit (in this case the limit is 9 articles per page). Same thing on individual article page.

I´ve disabled the ob1_pagination plugin to check if there was any kind of conflict but still the same thing. And ob1_pagination doesn´t work also.

[EDIT] It appears that the page can´t see when i´m displaying articles list so that´s the reason why the tags aren´t working. Here´s the page code

<div id=“nav-hold”> <div id=“nav-wrap”> <txp:output_form form=“navigation” /> </div>
</div> <div id=“product-wrap”> <div id=“product-hold”>
<txp:if_individual_article>
##products_form_language##
<txp:else />
<div id=“product-aux-content”> <txp:image id=“26” /> <txp:category_list parent=“lingerie” wraptag=“ul” break=“li” section=“products” /> ##can_we_help## </div> <div id=“product-article-list”> <div id=“product-nav-hold”> <txp:ob1_pagination firsttext=”<<” previoustext=”<” nexttext=”>” lasttext=”>>” ulid=“product-nav” liclass=“product-nav-link” liselected=“product-nav-nolink” liempty=“product-nav-nolink” maximumtabs=“5” /> </div> ##products_form_language##

</div>
</txp:if_individual_article>

##product_form_languaje## snnipet code is simple:

<div class=“product-list”> <txp:permlink><txp:article_image thumbnail=“1” /></txp:permlink> <h3><txp:permlink><txp:title /></txp:permlink></h3> </div>

The thing is that if i put ob1_pagination inside the form then it works. But it repeats the navigation on and on for each article…
Any ideas on what´s going on would be great.

Thx in advance

Last edited by brunodario (2008-03-11 19:41:22)

Offline

#674 2008-03-11 21:06:22

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

Re: MLP - The Multi-Lingual Publishing Pack

What happens if you disable the MLP? Does pagination work then?

I’m wondering if it’s a MLP problem or a more basic problem with the pagination itself. I don’t remember now what I did, but I had problems with pagination that I think were caused by how I was thinking about it.

Looking at your code, it seems to me that you’re trying to place it on the wrong page.

Check this page in the Textbook

The older tag is both a Single Tag and a Container Tag. Should be used in a page after an article tag.

I found this to be confusing myself. You put the article tag and the older/newer on one page (or possibly on a form) and then determine how an individual article will look in another form. The older/newer is not part of the individual article. It’s part of the list of articles (even if only one is returned). In other words, the older/newer do not go on the form that formats the display of the article.

Hope that helps.

Last edited by azw (2008-03-11 21:08:52)

Offline

#675 2008-03-13 20:16:13

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

Re: MLP - The Multi-Lingual Publishing Pack

Here’s a question for Maniqui, FireFusion, and anyone else who has updated to the latest version.

FireFusion wrote:

Hmm got the following error on upgrading but otherwise seems ok. Is this a problem?

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’m wondering about this error. (Warning: I’m not a whiz with php.)

It may be coming from this bit of code in l10n:

function _l10n_substitute_snippets( &$thing )
{
/*
Replaces all snippets within the contained block with their text from the global textarray.
Allows TxP devs to include snippets* in their forms and page templates.
*/
...
  if( array_key_exists( $snippet , $textarray ) )
    $out = $textarray[$snippet];
  else
    $out = "($lang)$snippet";
...

If that bit of code were mal-functioning, snippets might not work correctly. Have you seen any problems with snippets?

There’s another array_key_exists conditional at about line 825.

#	If a translation exists for that language then we
# build a valid url to it and make it active in the list, otherwise include it in the
# list but wihtout the hyper-link.
#
#	The active page is marked up with a css class.
#
if( array_key_exists( $lang , $alangs ) )
...

If that failed, it would probably cause the language selection links ( <txp:l10n_lang_list />) to not work. Do they?

Offline

#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

Board footer

Powered by FluxBB