Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2020-02-04 08:14:01

Summer
Member
Registered: 2018-01-29
Posts: 60

Re: Testers needed: flat development (4.7+ only)

colak wrote #321498:

is the plugin needed? Flat files are now supported in the core.

em… I feel like I missed something…

Offline

#170 2020-02-04 09:01:46

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

Re: Testers needed: flat development (4.7+ only)

colak wrote #321498:

is the plugin needed? Flat files are now supported in the core.

Yes, but they’re not supported direct from disk during development. This plugin adds that.


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

Online

#171 2020-02-04 11:23:35

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Testers needed: flat development (4.7+ only)

What a n00b I am! Thanks Summer.

Offline

#172 2020-08-17 08:31:18

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

Re: Testers needed: flat development (4.7+ only)

I may be using this on a project soon that’s managing their Txp templates on disk for git control. What is the status of the plugin with the dev/live workflow?

From my understanding the plugin does not inject any data into the database, rather just lets the database fetch assets from disk while in testing/debug mode, correct? So does it honour the dev assets that are set, for anyone using developer preview? What happens for those not using developer preview? And how does it work if you have a mix of dev/live assets being served from the DB?

Secondly, I guess after development is done and all signed off, this is the process:

  1. Switch production mode to Live.
  2. From the Themes panel, select theme and Import from disk.
  3. From the Sections panel, select sections and Deploy to live, as normal.

Correct?


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

Online

#173 2020-08-17 09:18:53

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Testers needed: flat development (4.7+ only)

IIRC, etc_flat fetches assets from themes folder. It is important to notice that there is no live/dev versions of a theme, the entire theme can be live or dev individually for each section. So, everything happens (almost) exactly as usual: logged-in users will get their dev assets served from disk, and other visitors will be served live assets, but from db.

The plugin does not keep db/disk in sync, leaving it with admins.

Offline

#174 2020-08-17 09:22:51

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

Re: Testers needed: flat development (4.7+ only)

Of course, that makes perfect sense. Thanks for the clarification.


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

Online

#175 2020-08-17 10:54:34

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Testers needed: flat development (4.7+ only)

Also, styles are not handled by this plugin (there is no ‘fetch css’ callback), but one can link to their flat versions in core anyway.

Offline

#176 2020-10-09 18:03:31

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

Re: Testers needed: flat development (4.7+ only)

My usage of textpattern and contribution to this forum has dropped off significantly in the last couple of years due to vocational changes. I had a really good workflow going using the last version of oui_flat.

  1. Custom form types via subdirectories helped me keep a super clean codebase
  2. Automatic import, allowed me to have a super efficient headless CMS for dev tasks

could these features be enabled?

From scanning this topic I can see that most people don’t groove on the idea of automatic import, but it could be added as a admin pref or even a hidden pref.

Offline

#177 2020-10-09 18:49:44

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

Re: Testers needed: flat development (4.7+ only)

Hi Dale, good to hear from you. You can enable additional subdirectories for forms in the advanced options section of prefs (first turn on advanced options at bottom of admin prefs section). In the custom form templates field add subdirectories as follows:

[shortcodes]
*="Shortcodes"
[another-directory-name]
*="Another form type name"

As for auto import, I think there was a plugin to allow that when site is set to debug, or something like that.

Offline

#178 2020-10-09 18:57:42

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

Re: Testers needed: flat development (4.7+ only)

philwareham wrote #326289:

As for auto import, I think there was a plugin to allow that when site is set to debug, or something like that.

Anyone know of this mystery plugin? :)

Offline

#179 2020-10-09 19:44:07

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Testers needed: flat development (4.7+ only)

mrdale wrote #326290:

Anyone know of this mystery plugin? :)

When logged in in debug/testing modes (and etc_flat enabled), you get assets directly from the disk. Once happy with the result, import them into your theme and serve your visitors?

Offline

#180 2020-10-09 23:03:20

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

Re: Testers needed: flat development (4.7+ only)

etc wrote #326295:

When logged in in debug/testing modes (and etc_flat enabled), you get assets directly from the disk.

I must be doing something wrong.
  1. enable etc_flat
  2. testing mode
  3. delete a couple of forms in the file system
  4. alter a couple of pages and forms in the filesystem
  5. visit the forms and see a message
  6. visit the pages and see a message

Result: No forms deleted, no pages altered.
Desired workflow: I merrily alter my codebase in the file system and anytime the site is hit from anywhere my edits are imported into the database.

I like this workflow because I generally work on a staging server and can develop quicker when I don’t have to page around in a UI. I periodically push up a new version to the server and/or github

Anyone else feel like that would be a good workflow. Anyone else game?

Offline

Board footer

Powered by FluxBB