Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2016-02-04 21:31:58

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: rah_flat (template file extensions)

So jakob, dod you know enough php to change the routine that looks in the flat folders so that it works recursively?

That’s really all I want.

Offline

#17 2016-02-05 09:18:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: rah_flat (template file extensions)

mrdale wrote #297728:

For now I use all forms as .misc because form types are functionally irrelevant.

Forms of type article still have relevance on the Write panel, but if you’re not using override forms then, yes, types are for organisation only.

jakob wrote #297733:

you could theoretically use anything if txp doesn’t mind.

Unfortunately Txp minds (at present). From 4.6.0 though, there’s a new function get_form_types() which responds to the event>step form.types>types so plugins can extend or alter them. The Forms panel doesn’t use it right now, but alterations to a couple of lines of code would probably change that. Been meaning to try that for ages so I shall test it prior to release.

As I’ve mentioned before I’ve flip-flopped so many times on allowing arbitrary Form types. It’s not technically difficult to do behind the scenes, it’s just making a usable interface that I always struggle with. Always ends up being clunky or unintuitive, or causes workflow inconsistencies due to the “essential” Forms and multi-edit tool. There are threads about my plight dotted around the forum if anyone wishes to put me out of my misery and suggest a way to do it.

But you would still have the problem of possible duplicate form names.

That’s the killer point. The database index is on the name only so they have to be unique across types. myform.misc and myform.section will break things. Any third party such as this plugin would need to enforce uniqueness.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#18 2016-02-06 13:09:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,192
Website GitHub

Re: rah_flat (template file extensions)

mrdale wrote #297740:

do you know enough php to change the routine that looks in the flat folders so that it works recursively?

I’ll have a go – no guarantees though. I can’t code like Jukka and I can’t do it right away either, but I’m interested in the idea too…


TXP Builders – finely-crafted code, design and txp

Offline

#19 2016-02-29 01:36:47

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 433
Website GitHub Twitter

Re: rah_flat (template file extensions)

I’m trying to wean myself off cnk_versioning and move to rah_flat.

The problem is, I can never get rah_flat to work. If my assigned template directory is empty, no errors. The moment I add my ‘default.txp’ file into templates/pages/, I get General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLES errors, both in admin and on the site.

This happens on a fresh install as well as installing rah_flat on an ex-cnk_versioning site.

Any suggestions?

Offline

#20 2016-02-29 07:21:13

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,252
Website Mastodon

Re: rah_flat (template file extensions)

giz wrote #298056:

I’m trying to wean myself off cnk_versioning and move to rah_flat.

The problem is, I can never get rah_flat to work. If my assigned template directory is empty, no errors. The moment I add my ‘default.txp’ file into templates/pages/, I get General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLES errors, both in admin and on the site.

This happens on a fresh install as well as installing rah_flat on an ex-cnk_versioning site.

Any suggestions?

man this inability to have an elegant simple solution to flat files is soooo 2005


…. texted postive

Offline

#21 2016-02-29 11:21:29

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: rah_flat (template file extensions)

bici wrote #298058:

man this inability to have an elegant simple solution to flat files is soooo 2005

It’s already in a branch awaiting Textpattern 4.7. Please be patient.

Offline

#22 2016-02-29 20:19:05

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,192
Website GitHub

Re: rah_flat (template file extensions)

giz wrote #298056:

The moment I add my ‘default.txp’ file into templates/pages/, I get General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLES errors, both in admin and on the site.

I’ve never seen that before, so I’m not really sure why. Maybe something special with your mysql setup?

A long shot. Jukka’s last commit removed a lock tables command – see here. You might want to see if reinstating those two lines correct things for you. If you didn’t install with composer and are not sure where those are in the plugin code, click on the ‘concertina’ icons in the line numbers on github to reveal the preceding and following code.

Otherwise, I’ve found it does work as a more reliable replacement for cnk_versioning.


TXP Builders – finely-crafted code, design and txp

Offline

#23 2016-02-29 20:58:15

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 433
Website GitHub Twitter

Re: rah_flat (template file extensions)

jakob wrote #298075:

A long shot. Jukka’s last commit removed a lock tables command – see here.

Thanks Juilian – your long shot did the trick – I removed the safe_query lines on either side of the callback_event and all is well :)

Last edited by giz (2016-02-29 20:58:28)

Offline

#24 2016-03-01 08:30:07

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 605

Re: rah_flat (template file extensions)

bici wrote #298058:

man this inability to have an elegant simple solution to flat files is soooo 2005

philwareham wrote #298060:

It’s already in a branch awaiting Textpattern 4.7. Please be patient.

Whoop! Whoop!

Last edited by Algaris (2016-03-01 08:30:54)

Offline

#25 2016-03-10 17:50:32

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: rah_flat (template file extensions)

mrdale wrote #297541:

I realized the other day that if rah_flat were to look recursively under the forms directory and not just one level deep we would have a killer organizational tool.

Just had “Override forms“ in mind and thought “Hope mrdale’s new feature doesn’t kill form overriding”.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#26 2016-03-20 15:57:29

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: rah_flat (template file extensions)

Flat-file management

philwareham wrote #298060:

It’s already in a branch awaiting Textpattern 4.7. Please be patient.

Yow, what?! That sounds good.

And that should be a .com blog post ASAP, elaborating on how that will work and all. Marketing, baby, marketing.

Inquiring minds need to know details!

Offline

#27 2016-03-21 15:57:18

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: rah_flat (template file extensions)

Yep… peeps want sweet deets.

Offline

Board footer

Powered by FluxBB