Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#2281 2013-10-12 09:17:37

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hey Stef, no joy so far. Copied and pasted the entire MLP plugin code as your previous suggestion didn’t work, but just took a look and get this error message on the front end of the site:

Parse error: syntax error, unexpected '}' in /var/www/vhosts/domain.com/httpdocs/old/textpattern/lib/txplib_misc.php(812) : eval()'d code on line 2609 The above errors were caused by the plugin:l10n 
Fatal error: Class 'MLPLanguageHandler' not found in /var/www/vhosts/domain.com/httpdocs/old/textpattern/lib/txplib_misc.php(812) : eval()'d code on line 2601 

I’ll take a look at it again tomorrow when I have time, but thought I’d post in case its a simple fix that you know about.

Offline

#2282 2013-11-11 22:49:30

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi,
@Bloke, I worked on a fresh TXP+MLP install with an old Mamp version (1.8.4) and everything was fine.
I tried to move the site online and I ran with two problems : I can’t save translated renditions and I have an
internal error “Array to string conversion” each time I click on a MLP tab.
I fixed the first issue with your fix by undo your edits but without commenting out the return. Thanks for that!
But I still have the internal error on an OVH hosting with Linux 3.10.11 / PHP 5.4.19 / MySQL 5.1.66.
I also have a log message about _dyuweyrj4 and _dyuweyrj4r functions which are disabled.
I don’t know if it can help you to find a good fix… Let me know if you need any other informations.

Edit: I found a way to change the PHP version on my host and you are right about that… It’s fine with 5.3.27

Last edited by NicolasGraph (2013-11-11 23:02:07)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2283 2013-11-11 22:57:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,762
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

NicolasGraph wrote:

internal error “Array to string conversion”

Drat. Do your Txp or PHP logs (or debugging mode?) happen to indicate exactly which line of code and in which file this error occurs? Just to give me a starting point. I think I know where to look but it’d help give me a jump-start if I could narrow it down a bit. Thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2284 2013-11-11 23:07:54

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: MLP - The Multi-Lingual Publishing Pack

Sorry,
Here are the messages I found in debugging mode:

Erreur interne "Array to string conversion" 
in /homez.783/acclamer/www/textpattern/lib/txplib_misc.php at line 854.
textpattern/lib/txplib_misc.php:854 adminErrorHandler()
textpattern/index.php:173 callback_event()

As I told in my previous edit, it works with PHP 5.3.

Edit: I forgot to tell that when the error appears there is also a styling problem in the MLP tabs (big font-size).

Last edited by NicolasGraph (2013-11-11 23:21:08)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2285 2013-11-12 16:34:11

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi, …again
I also have a problem with the pagination links using etc_pagination and MLP.
I talked with Oleg about that but it does not come from his plugin as <a href="?pg=3">#</a> is not working either. The good old textpattern pagination (older/newer) works well and it’s not really important for me at the moment but if someone understand something… I’d be happy to hear you!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2286 2013-11-12 16:53:04

etc
Developer
Registered: 2010-11-11
Posts: 4,675
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

NicolasGraph wrote:

Hi, …again
I also have a problem with the pagination links using etc_pagination and MLP.
I talked with Oleg about that but it does not come from his plugin as <a href="?pg=3">#</a> is not working either. The good old textpattern pagination (older/newer) works well and it’s not really important for me at the moment but if someone understand something… I’d be happy to hear you!

Hi Nicolas,

haven’t you said that everything is fine online? If so, the problem must be somewhere else, I don’t think MLP rewrites inline links. I guess MLP injects its own url scheme into pagelinkurl function, so it’s normal that <txp:older/newer /> function well. I would be glad to make etc_pagination MLP compatible, but the doc is offline…

Offline

#2287 2013-11-12 17:26:55

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: MLP - The Multi-Lingual Publishing Pack

etc a écrit:

haven’t you said that everything is fine online?

I have said that but I was probably too tired because it’s wrong… Sorry!

Last edited by NicolasGraph (2013-11-12 17:29:24)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2288 2013-11-12 17:57:30

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: MLP - The Multi-Lingual Publishing Pack

etc wrote:

I don’t think MLP rewrites inline links.

That is exactly how MLP works. MLP doesn’t use URL callbacks or core features, but instead scans the final HTML (and RSS/Atom) output for bare href="" instances and modifies the value between quotes. That’s one of the many reasons why it doesn’t play well with any other plugins, and ends up doing stuff it isn’t supposed to do.

I would be glad to make etc_pagination MLP compatible, but the doc is offline…

Source and documentation are in the git repository.

As the language identifier in links goes, the only way to omit it is by not including the site URL in the link. If for some reason the generated link is malformed (e.g. lang component is in the wrong spot), the plugin doesn’t offer a way to render your own links, but you can create one by appending $l10n_language to the path component. Just remember to omit the site URL, otherwise MLP appends the language to to domain.

Last edited by Gocom (2013-11-12 18:12:59)

Offline

#2289 2013-11-12 18:14:00

etc
Developer
Registered: 2010-11-11
Posts: 4,675
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

Gocom wrote:

That is exactly how MLP works.

Really?! save who can!! OK, then something goes wrong when MLP transforms <a href="?pg=3">#</a> into something unexpected.

Source and documentation are in the git repository.

Thank you, got the main idea now.

Offline

#2290 2013-11-12 19:24:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,762
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

etc wrote:

I would be glad to make etc_pagination MLP compatible

I’d rather you made MLP etc_pagination compatible :-)

Seriously.

The MLP code is a shambles in this day and age. It needs to use the callbacks and do things nicely. It’s just creaking and is going to break big time in 4.6 unless something is done to rethink it. If you have the energy to brainstorm it, drop me a line. You’d have my full support for any reasonable changes to core to make a better multi-lingual experience out of the box, or to make it easier to write a simpler plugin instead of the current behemoth hack.

Last edited by Bloke (2013-11-12 19:27:05)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2291 2013-11-12 21:50:46

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

Re: MLP - The Multi-Lingual Publishing Pack

etc wrote:

I would be glad to make etc_pagination MLP compatible, but the doc is offline…

I added it here as well: txpforge.org/projects/mlp/wiki/Making_your_plugin_MLP_compatible

Offline

#2292 2013-11-12 23:20:38

etc
Developer
Registered: 2010-11-11
Posts: 4,675
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

Stef, you are a hero to maintain what is almost another Txp version.

Bloke wrote:

If you have the energy to brainstorm it, drop me a line. You’d have my full support for any reasonable changes to core to make a better multi-lingual experience out of the box, or to make it easier to write a simpler plugin instead of the current behemoth hack.

Nice trap! :) That’s far beyond my coding skills, but if it can help in any way, I’m here to discuss. The whole MLP functionality would require more than reasonable changes, I’m afraid. Give me some time to install and try it, I’ll be back.

Els wrote:

I added it here as well: txpforge.org/projects/mlp/wiki/Making_your_plugin_MLP_compatible

Thank you, Els. From what I see, etc_pagination should already be MLP compatible, but something goes wrong. I’ll try Jukka’s suggestion as an immediate patch.

Offline

Board footer

Powered by FluxBB