Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1696 2011-02-04 17:46:18

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: MLP - The Multi-Lingual Publishing Pack

wornout wrote:

After installation of MLP in the Write tab the excerpt field is duplicated.
The first one doesn’t have “dir” attribiute. The copy had it!
Is it a MLP bug?’

I posted a temporary workaround for this issue here.

Offline

#1697 2011-02-06 23:39:29

paxrex33
Member
Registered: 2007-10-25
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

Hello everybody,

I’m using Textpattern 4.2.0 and MLP 0.9.13-gp.
I have a bilingual site I developed localy on my PC which I’m trying to transfer to my provider.
But I have a weird problem.
I’m getting this error whatever link mode I choose (in this case I’m using messy mode).

The requested URL /en/index.php was not found on this server.

The URL I’m requesting is http://www.geomehanika.rs/en/index.php?s=05kontakt
But when I delete /en from the URL I get the requested page.

What could be a problem?

Offline

#1698 2011-02-07 20:54:52

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: MLP - The Multi-Lingual Publishing Pack

How can I suppress the wraptag in l10n_lang_list? When I pass wraptag="" in the plugin tag, it generates an HTML tag with no element name, like this: < class="....

I want to markup the language list as a dl, with “Language” as the dt, and the languages marked as dd elements.

Edit: This code works, but it generates a needless and invalid span element:

<dl class="lang-list">
<dt>##string_language##:</dt>
<dd class="l10n_current"><txp:l10n_get_lang type="native"/></dd>
<txp:l10n_lang_list
	break="dd"
	surpress_current="1"
	wraptag="span"/>
</dl> <!-- EO .lang-list -->

“Element span not allowed as child of element dl in this context.” Or in any context, as far as I know.

Last edited by johnstephens (2011-02-07 21:20:08)

Offline

#1699 2011-02-07 21:11:47

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: MLP - The Multi-Lingual Publishing Pack

Also code generated by the select wraptag doesn’t include a label. In order to add a label element manually, an id for the select element is needed as a hook for the label’s for attribute. Is there any way to add an id to the generated markup?

If there’s a better tag for listing the site languages as a definition list, please let me know. I’m only looking into the select option as an alternative.

Last edited by johnstephens (2011-02-07 21:13:37)

Offline

#1700 2011-02-07 21:37:24

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

Re: MLP - The Multi-Lingual Publishing Pack

paxrex33

Can you post your (high) diagnostics? At first sight I have no idea…

Offline

#1701 2011-02-07 21:54:04

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

Re: MLP - The Multi-Lingual Publishing Pack

John

I can’t find a way to make the tag on its own work with a definition list either… I did find a very ugly workaround though, using rah_replace:

<dl class="lang-list">
<dt>##string_language##:</dt>
<dd class="l10n_current"><txp:l10n_get_lang type="native"/></dd>
<txp:rah_replace from='<p class="l10n_lang_list">,</p>' to=",">
<txp:l10n_lang_list
	break="dd"
	surpress_current="1"
	wraptag="p"/>
</txp:rah_replace>
</dl> <!-- EO .lang-list -->

Last edited by els (2011-02-07 22:00:53)

Offline

#1702 2011-02-07 22:06:18

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: MLP - The Multi-Lingual Publishing Pack

Awesome, Els— thanks! I already have pax_grep running, which can do the same thing.

Offline

#1703 2011-02-14 05:58:32

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: MLP - The Multi-Lingual Publishing Pack

Has anyone got MLP play nice with PHP 5.3.0 or later?

I get a couple of notices on front end like this:

“Deprecated: Function split() is deprecated in ‘hosting absolute path’/textpattern/lib/txplib_misc.php(638) : eval()’d code on line 243”

I read people say that these notices can be ignored, but I don’t see it as solution since the site is on shared hosting (with PHP 5.3.2) and turning off notices doesn’t seem to be an option.

I thought upgrading to TXP 4.3.0 and the latest MLP would help but no. (Notices from the back end that I had with TXP 4.2.0 and mlp-0.9.13-gp seem to be disappeared though.)

I was wondering if replacing all deprecated calls would be a relatively simple task or requires complete rewrite.

Offline

#1704 2011-02-14 19:44:31

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

Re: MLP - The Multi-Lingual Publishing Pack

Teemu, won’t the message disappear if you set Production status to ‘live’?

Offline

#1705 2011-02-15 06:28:34

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: MLP - The Multi-Lingual Publishing Pack

My production status is set to ‘live’ and I get notices with a red font on the front end top.

I just noticed that with status to set to ‘testing’ similar red notices appear also on back end. So status ‘live’ seem to remove the notices from back end but not front end.

I have toggled the settings, re-installed MLP… the problem persists.

Offline

#1706 2011-02-15 19:17:23

frischmilch
New Member
From: Cologne, Germany
Registered: 2011-02-15
Posts: 2
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hello,

I recently noticed a problem with <txp:site_url />.

In the standard comment_form <form action=”… the URL for the post action (comming through txp:site_url) does not contain the language prefix /de or /en. it just begins with the textpattern-url-scheme /section/id.

During comment_preview the site_url points then to my /favicon.ico wich gives totally wrong results when posting a comment (in fact, the browser asks me to download the favicon).

I am curious, because I could not find anything about this through google and wondering if that is a known problem?

  • using textpattern 4.30
  • Had the same results/problem with MLP 0.9.13-gp with additional tweaks and the mlp-4.3.0.12 wich I am currently on.

any ideas?


—Johannes Henseler
—nordsueddesign.de

Offline

#1707 2011-02-15 21:42:20

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

Re: MLP - The Multi-Lingual Publishing Pack

frischmilch wrote:

I recently noticed a problem with <txp:site_url />.

In the standard comment_form <form action=”… the URL for the post action (comming through txp:site_url)…

Where do you see that? As far as I know it’s not in the default comment_form (or maybe the one there is not up to date?)

…does not contain the language prefix /de or /en. it just begins with the textpattern-url-scheme /section/id.

That’s right, but commenting still works.

During comment_preview the site_url points then to my /favicon.ico wich gives totally wrong results when posting a comment (in fact, the browser asks me to download the favicon).

That is very strange. When I click ‘preview’ the URL loses the language marker, and adds #cpreview to the end. I do have a favicon.ico, but I can’t reproduce the error. How are you linking to the favicon.ico on your page?

Offline

#1708 2011-02-15 23:43:44

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

Re: MLP - The Multi-Lingual Publishing Pack

Teemu wrote:

I was wondering if replacing all deprecated calls would be a relatively simple task or requires complete rewrite.

I hope someone else can answer this question for you, I’m afraid I have no idea…

Offline

#1709 2011-02-16 01:08:12

frischmilch
New Member
From: Cologne, Germany
Registered: 2011-02-15
Posts: 2
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els, thank you for your quick and comprehensive answer!

Where do you see that? As far as I know it’s not in the default comment_form (or maybe the one there is not up to date?)

the comment_form wraps the actual form inside a <form> tag with the described action. I thought the lost language tag was a hint for an error.

That is very strange. When I click ‘preview’ the URL loses the language marker, and adds #cpreview to the end. I do have a favicon.ico, but I can’t reproduce the error. How are you linking to the favicon.ico on your page?

here is the solution. I reffered to the favicon with a “/favicon.ico” in the link rel head tag. an absolute path www.domain.com/favicon.com solved this: the site_url never gets confused.
so it is obviously a strange server/textpattern-issue.

thank you, Els. this resolved a headache for me.


—Johannes Henseler
—nordsueddesign.de

Offline

#1710 2011-02-16 07:00:25

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: MLP - The Multi-Lingual Publishing Pack

Els, thanks for noticing anyways.

Digging deeper I came up with a solution. The problem originates from the ‘Use browser “accept-language” headers?’ setting in the MLP preferences.

So if someone gets notices about deprecated split() functions with PHP 5.3.x, setting this to ‘no’ will get rid of them.

However, in my case I wanted to keep using language headers, so what I did is edited the l10n plugin code slightly.

There’s two ‘split’ funtions, in line 237 and 242, which I replaced with ‘explode’. I’m not a php coder, by no means, but this seems to be working.

Offline

Board footer

Powered by FluxBB