Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#2389 2017-01-19 14:04:11

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: MLP - The Multi-Lingual Publishing Pack

As a tip to everyone considering using MLP productively with Textpattern 4.6: I find myself gonig into phpMyAdmin a lot to correct section titles, to delete articles. I would not recommend using MLP & 4.6 with clients.

Offline

#2390 2017-01-25 17:12:02

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

funtoosh wrote #303602:

any news on MLP? The updates by spiridon look pretty cool!

Hello!

So! Works on updating the plugin are completed!

What has been done?

  • Modified procedures for setup/cleanup MLP
  • Changed the procedure for upgrading MLP. When a newer version of the plugin (variable l10n_version in the txp_prefs table) it will check the rendition tables and their type. It will create views, if they were not. And it replaces the tables by views, if there was a tables.
  • Changed the procedure for modifying rendition tables on any changes made to the site languages
  • Removed operation changes in the rendition tables at:
    • create article
    • change article
    • deletе article
    • changes in the names of sections and categories
    • change the master table structure

Look github.com/dshovchko/MLP/tree/v4.6.0.tables2views and test. And do not forget about backups! :-)

Offline

#2391 2017-01-25 17:33:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

spiridon wrote #303679:

So! Works on updating the plugin are completed!

This is fabulous work, thank you so much. Using Views is going to make life so much easier than multiple rendition tables.

I’ll download your pull request and have a play, then merge it. Awesome stuff.

EDIT: oh, okay, your PR is only the first part of the fix. In which case I’ll download your version in its entirety.

Last edited by Bloke (2017-01-25 17:37:18)


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

#2392 2017-01-25 18:04:16

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote #303685:

This is fabulous work, thank you so much.

Thanks, Stef!

Bloke wrote #303685:

EDIT: oh, okay, your PR is only the first part of the fix. In which case I’ll download your version in its entirety.

Have I make a new PR?

Offline

#2393 2017-01-25 18:34:41

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote #303376:

Incidentally, the white screen thing is (I think) to do with the $trace functionality, which is why it goes away if you put the site in Live mode. But I cannot figure out why it occurs.

If it was an escaping issue, it should fail consistently, but it doesn’t. I’m totally stumped. Anyone with any clues, please offer suggestions.

I wanted to solve this problem. But it’s self-fixed! I can’t get it to repeat. :-(

funtoosh wrote #303632:

As a tip to everyone considering using MLP productively with Textpattern 4.6: I find myself gonig into phpMyAdmin a lot to correct section titles, to delete articles. I would not recommend using MLP & 4.6 with clients.

There was a bug in plugin code. When you remove the article, MLP generate a SQL with the wrong table name. As a result, the article was removed only from the master table. It is left in rendition table.

This bug has existed for quite a long time. I found it by accident when I have modified the MLP to work with Views. It won`t appear, when MLP works with Views.

Offline

#2394 2017-01-25 21:54:52

attadanta
New Member
Registered: 2012-11-07
Posts: 3

Re: MLP - The Multi-Lingual Publishing Pack

Hi Spiridon & All,

So! Works on updating the plugin are completed!

Thanks a lot! This is very encouraging.

However, I am having a problem mentioned a while ago in the same thread:

Notice: Undefined index: l10n_l10n-url_default_lang_marker on line 472

This is probably caused by me putting the database in an inconsistent state during previous attempts to upgrade the plugin to the newest version. Is there a way to migrate a bilingual site to the newest version without physical tables?

Offline

#2395 2017-01-26 06:45:53

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

attadanta wrote #303691:

Hi Spiridon & All,

Thanks a lot! This is very encouraging.

However, I am having a problem mentioned a while ago in the same thread:

Notice: Undefined index: l10n_l10n-url_default_lang_marker on line 472...

This is probably caused by me putting the database in an inconsistent state during previous attempts to upgrade the plugin to the newest version. Is there a way to migrate a bilingual site to the newest version without physical tables?

l10n_l10n-url_default_lang_marker. This option from the settings MLP – “Show default language marker in URLs?” (Yes/No)

Check there is an option in the txp_prefs table or not:

SELECT * FROM `txp_prefs` WHERE name='l10n_l10n-url_default_lang_marker';

If not, add it

INSERT INTO `txp_prefs` (`prefs_id`, `name`, `val`, `type`, `event`, `html`, `position`, `user_name`) VALUES ('1', 'l10n_l10n-url_default_lang_marker', '1', '2', 'l10n', 'yesnoradio', '0', '');

I think it will solve your problem :-)

Offline

#2396 2017-01-26 08:53:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

spiridon wrote #303689:

Have I make a new PR?

Certainly, if you like.

Or…. since you seem far more clued up than I am, you could take over development of the entire thing and I’ll point my repo to yours? It’d be one less thing for me to worry about so I could focus more on core, one feature of which is finding a way to offer a multi-lingual experience out of the box. Or — at very least — make better callback hooks and core code so it’s much easier for something like MLP to exist as a true plugin instead of a bunch of extra files and hacks. If someone such as you were looking after MLP in the meantime, we could work together towards that goal. What do you think?

The UI desperately needs some attention to bring it in line with the 4.6.2 theme. I also noticed that I got a JS error when trying to toggle language on my test site (toggleTextElements()) so that might need looking at too. And if you ever get the urge, the whole ‘buffer scraping’ thing that MLP does to build the interface is largely unnecessary now. We have many more callbacks and pluggable_ui() hooks available these days, which MLP could hook into to add interface elements instead of searching and replacing strings in the buffer. It’d make it way more robust and easier to maintain too.

btw, the docs I linked above have not been converted to Markdown yet so they look a mess, but I’ll try and get to those today and update them with the latest callbacks.


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

#2397 2017-01-26 20:42:24

attadanta
New Member
Registered: 2012-11-07
Posts: 3

Re: MLP - The Multi-Lingual Publishing Pack

spiridon wrote #303692:

I think it will solve your problem :-)

It did, and if there’s any way I can buy you a drink, book, etc., you should write me an email.

Thanks.

Offline

#2398 2017-01-27 15:37:59

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: MLP - The Multi-Lingual Publishing Pack

Thanks for all the work on this.

I just upgraded to Textpattern Version 4.6.2 and discovered that my site stopped working. I am unable even to login to txp admin…

Fatal error: Call to undefined function l10n_installed() in /nfs/c01/h09/mnt/6213/domains/oldphotosjapan.com/html/textpattern/lib/txplib_misc.php(1782) : eval()'d code on line 360

I’ve been going over the latest posts in this thread and looked at GitHub, but am not sure what to do.

Is there a manual or a step by step description for upgrading MLP to work with TXP 4.6.2?

(Using PHP version 5.6.21)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#2399 2017-01-31 15:16:55

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote #303693:

Or…. since you seem far more clued up than I am, you could take over development of the entire thing and I’ll point my repo to yours?

Okay, Stef, you got me. But I`m not looking for newer versions of Txp. And not an active participant in the community. I will fix the problems you have discovered. But in the case of a new release it would be nice to notify me in advance so I had time to check and adapt the plugin.

Stef, which is the easiest way to contact you, in addition to the forum?

Offline

#2400 2017-01-31 15:25:31

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: MLP - The Multi-Lingual Publishing Pack

Kjeld wrote #303701:

Fatal error: Call to undefined function l10n_installed() in /nfs/c01/h09/mnt/6213/domains/oldphotosjapan.com/html/textpattern/lib/txplib_misc.php(1782) : eval()'d code on line 360

Check that the file textpattern/vendors/Netcarver/MLP/Kickstart.php is the latest version

Is there a manual or a step by step description for upgrading MLP to work with TXP 4.6.2?

forum.textpattern.com/viewtopic.php?pid=302169#p302169

Offline

Board footer

Powered by FluxBB