Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#2185 2013-02-01 01:04:16

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

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

could you consider making it an option?

I knew I shouldn’t have been so hasty.

I’ll add an option when I trawl through the code and find exactly what bits were changed.


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

#2186 2013-02-01 02:47:54

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

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

Waiting on Jonathan to reply to my email as I can’t figure out to which site he’s referring. I don’t know if his problems are related to the one ru highlighted or not.

That’s bad to hear – I replied immediately! I’m in India right now so not sure if something went missing. Please check your spam Stef – I can’t believe the mail went there but I’ll send the mail again right now. For reference, the problem site in question is ceramicdictionary.com and you have a login…

The other site your mentioned in your mail needs a site wide update, plus the MLP install on it is screwed up. But in a different way, not related to this Write tab issue.

Offline

#2187 2013-02-01 09:05:57

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

Re: MLP - The Multi-Lingual Publishing Pack

jstubbs wrote:

I replied immediately!

Thought it was odd not to have heard. Not in spam. And no sign of the resend either Guess it’s just gmail being over-zealous as usual. Tried logging in, but it’s refusing my advances and also the password reset confirmation email is not coming through. Grrr.

Could you please temporarily reset my password in phpMyAdmin to some known value (maybe the domain name of the ‘other site’ mentioned above that has MLP issues) and check I’m not ‘None’ privs, then I can log in straight away and change it to something I’ll remember. Ta. If I was receiving mails from that domain you could do a conventional reset, but hey… this site isn’t on spencer.joyent.us is it?

Last edited by Bloke (2013-02-01 09:12:07)


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

#2188 2013-02-01 09:35:41

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

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

If it does, it means I can tag releases directly on github

Yeah, it has. You can find the same branching and tagging commands from both.

But there is bit of a but. You are not really supposed to host compiled code on a repository, such as packaged plugins. Repositories are not for file or version dumping, but for development — for organizing revisionable source code and assets.

I would personally recommend compiling and hosting the plugins elsewhere, outside GitHub. If you want to use git for development you can put a clone up to GitHub. It’s great service and offers other neat little features too. But if you aren’t really using git, and find using it pain, the plugin has very little reason to be there.

If you want to keep using git, you can automate the packaging process by setting up a minimal packaging server which pulls the sources from GitHub (daily, or based on hooks), compiles the needed packages, and puts them up for download.

Last edited by Gocom (2013-02-01 09:55:24)

Offline

#2189 2013-02-01 10:36:29

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

Re: MLP - The Multi-Lingual Publishing Pack

Gocom wrote:

You are not really supposed to host compiled code on a repository, such as packaged plugins.

Thanks for the insight. That makes sense, and it’s a pain anyway to have them there. I’d like to pull the compiled plugins out of the github repo and manage them offline because they will always be out of sync with the source and it gets confusing.

I think the fact that github allows you to “download” a zip of the repo gives the illusion that everything you need is in that package. I will probably shuffle things around in the repo at some point, remove the compiled plugins and put some funky script thing together to bundle it all up into a ‘release’ that I’ll serve from somewhere else. Maybe I’ll still tag the releases in the repo simply so I have the option to check out a particular ‘release’ in case of a support query (and I happen to have lost the zip package I’ve prepared).


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

#2190 2013-02-02 17:50:51

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

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

Could you please temporarily reset my password in phpMyAdmin to some known value (maybe the domain name of the ‘other site’ mentioned above that has MLP issues) and check I’m not ‘None’ privs, then I can log in straight away and change it to something I’ll remember. Ta. If I was receiving mails from that domain you could do a conventional reset, but hey… this site isn’t on spencer.joyent.us is it?

Hi Stef, I’ve mailed you back to the same email account you sent the mail from. Hope it works this time!

Offline

#2191 2013-02-11 17:46:07

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

Re: MLP - The Multi-Lingual Publishing Pack

Thanks to Jonathan’s in-depth feedback and testing (when I eventually got the e-mails after a rather daft snafu on my part) I traced a lot of the issues to one simple problem: table synchronisation.

Essentially, when you edit an article on the admin side, Textpattern saves the details in the regular textpattern table and then duplicates this information into the relevant 10n_txp_<language_code> (rendition) table. Thus the MySQL definitions of all the tables must match pretty much exactly.

In Jonathan’s case, while using glz_cf, a new custom field had been created — custom_11 — but that change was not reflected in the renditions tables so MLP was throwing its toys out (silently of course).

Regardless that the problem came about because glz_cf did some weird things with the custom field values which permitted two custom_4s to exist(!) the fact that MLP didn’t detect the change was, I felt, a bug.

So last night I tried a different approach. Instead of reacting to glz_cf directly I’ve taken a more generic approach and MLP now monitors the textpattern table on every admin page hit, watching for any changes. Any time it finds something different, on the next admin page click it compares the definitions of both tables and tries to automatically alter the rendition tables to match.

This will hopefully make the pack easier to maintain because it’s not tied to “catching up” on specific plugins. In theory, any plugin that modifies the core’s table will be detected and handled by MLP without any intervention. And so far in my testing it works a treat.

There are limitations at present; most notably regarding Indexes: it does not synchronise those, so things like wet_haystack will not trigger MLP to do any alterations. It probably should, but making the necessary SQL statements up automatically is a bit more challenging so I’ll save that for another day (whether or not the indexes matter when synchronising tables is something I have not yet investigated).

The upshot is that the master branch that will very soon become the new version needs some testing so, please, if you have the ability to run it through its paces, please check that (for example) any changes you make in glz_cf are reflected in the rendition tables within one or two admin-side clicks (any tab except Plugins) and, more importantly, that article saves continue to work.

The fact remains that glz_cf is still a little flaky at times under certain conditions so what I may actually do is fork glz_cf anyway to fix the remaining couple of corner cases and also add sopme callbacks in there so other plugins (not MLP in this case) can react to changes immediately. Still thinking about that one.

In the meantime please leave feedback on the above aspects of MLP here if you can. Thanks.

Last edited by Bloke (2013-02-11 17:46:53)


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

#2192 2013-02-11 21:19:07

ru
New Member
Registered: 2012-10-12
Posts: 8

Re: MLP - The Multi-Lingual Publishing Pack

hello bloke,

i found another bug.

to reproduce it you need:
  • a category
  • some articles in this category
    (i tried it with category1)

now, rename the category.
the textpattern table gets updated as expected (every thing looks fine at the txp interface)
but if you take a look at the localized table or the frontend, all articles where being removed.

if you save this articles again – via editing or the renditions tab – they appear again at the localized table.

this bug is present in version:
txp: 4.4.1
mlp: 4.0.3

as well as in the masterbranch @ 9c1d1559ce

ru

Offline

#2193 2013-02-12 22:53:57

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

Re: MLP - The Multi-Lingual Publishing Pack

ru wrote:

rename the category

Yikes! That’s a huge hole, thanks for spotting it. Looks like that functionality has never been part of the pack so I can assume you must be the first person who’s ever tried to rename a category :-o

New bit of sticky tape applied. Please let me know if it works, and thanks for testing.


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

#2194 2013-02-13 00:50:17

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

Re: MLP - The Multi-Lingual Publishing Pack

For reference, I just tried to change the section title (for the default language) in the current MLP version (on the site we are working on Stef) and pressed save. Looked ok in the DB and on the front side.

Then I changed the section name – and the URL returns a 404. Changed the section name back to the original name and all is good again. So, seems this behaviour also applies to sections.

Offline

#2195 2013-02-13 00:54:47

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

Re: MLP - The Multi-Lingual Publishing Pack

jstubbs wrote:

So, seems this behaviour also applies to sections.

Strange, because there was already a handler for section name alterations. I just hijacked it for categories too in the changes I just made.

If the section name changes are not being picked up (i.e. the ‘Section’ columns in the rendition tables are not changing as well as the one in the textpattern table) then that may be some other issue. The code in the master branch works as far as I can tell on a clean install, so if this site doesn’t work with that version I’ll have to poke around and see what else might be affecting it.


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

#2196 2013-02-13 01:14:01

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

Re: MLP - The Multi-Lingual Publishing Pack

Stef – probably you should take a look (its on the site using the IP address). I did not upload after your latest commit – just wanted to test on the current version (or whatever version you placed on the site) for info purposes. Sorry for the confusion.

Offline

Board footer

Powered by FluxBB