Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-08-20 18:35:27

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,131

Testers needed: theme management in 4.8.3

github.com/textpattern/textpattern/issues/1538

During the development process for Textpattern 4.8.3, an issue with themes management was identified. This issue has been tentatively fixed, and in order to ensure this works as intended we are calling on testers to ensure the fix works in a wider variety of environments.

In the situation where styles are removed from a section and site, for example if styles are delivered from a CDN or other location, a subsequent import or export of a theme triggered error messages, and resulted in an empty styles directory for exports.

There’s an in-progress development build of what will ultimately become Textpattern 4.8.3 available for download here:

github.com/textpattern/textpattern/archive/4.8.3.zip

At the time of writing, this download includes the tentative fix made for the themes-related issue outlined above.

We would be grateful if you could test this build, paying particular attention to how themes are managed with the above scenario. Does it work as expected? Do you receive warnings and/or errors? Please test and let us know.

Finally, this issue is currently the only outstanding bug fix that’s being tracked for Textpattern 4.8.3. When we’re happy this is fixed, and assuming no further bugs are discovered in the process, Textpattern 4.8.3 will be coming soon.

Thank you.

Last edited by gaekwad (2020-08-21 06:57:48)

Offline

#2 2020-08-21 05:12:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: Testers needed: theme management in 4.8.3

Hi Pete,

Thanks! I’ll be checking this on Monday.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#3 2020-08-23 01:15:16

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,116
Website

Re: Testers needed: theme management in 4.8.3

I will try to take it for a test-ride tomorrow as I have done some theme related work that need export etc.

But I am not sure I understand what the actual issue is here? Is it a problem when no stylesheet is defined under the styles tab?


Where is that emoji for a solar powered submarine when you need it ?

Offline

#4 2020-08-23 13:00:36

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,131

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325526:

But I am not sure I understand what the actual issue is here? Is it a problem when no stylesheet is defined under the styles tab?

I’ve interpreted the issue as best I can – I’m also not entirely sure what the issue is from the report, but you may find the answer within: github.com/textpattern/textpattern/issues/1538

It’s possible Phil or Oleg could shed some light.

Offline

#5 2020-08-24 02:26:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,116
Website

Re: Testers needed: theme management in 4.8.3

gaekwad wrote #325528:

I’ve interpreted the issue as best I can – I’m also not entirely sure what the issue is from the report, but you may find the answer within: github.com/textpattern/textpattern/issues/1538

It’s possible Phil or Oleg could shed some light.

Yeah, I had read that GH ticket and did not understand the current state of what happens and what should happen, that is why I asked…

anyway, in a quick and very basic test, the things still seem to work fine on theme export for my existing structure. That structure stil has a stylesheet entry under the “Styles“ tab, the ‘original TXP-default’™ stylesheet now completely emptyfied and not referenced any where except under the “Sections” tab.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#6 2020-08-24 08:59:53

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,349
Website

Re: Testers needed: theme management in 4.8.3

Similar to phiw13, on importing a theme without a styles folder, I get a warning about cannot read from the styles folder, but the rest imports OK. I could assign a section and duplicate without problem. On export, with empty checkbox, it exported the same structure. On export, with checkbox ticked, it did as expected and created a styles folder with emptified default.css. So it all seems to work as i would expect it.


Wondrous Healing Wondrous ways to a healthy old age
Safe Reiki Harmless natural healing.
Gud One Blog

Offline

#7 2020-08-24 09:28:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: Testers needed: theme management in 4.8.3

I get the same error. The main question is, since the support of flat files, I cannot understand why would anyone prefer to have the css hosted on a different, not accessible by the db, directory.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#8 2020-08-24 09:35:16

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,116
Website

Re: Testers needed: theme management in 4.8.3

colak wrote #325541:

[…]I cannot understand why would anyone prefer to have the css hosted on a different, not accessible by the db, directory.

Oh, i don’t really know why my highly optimised and minified stylesheets can be of any use in the DB, except for linking to it, and even then.

But I am not really a theme guy, to be honest.

Last edited by phiw13 (2020-08-24 09:37:44)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#9 2020-08-24 11:25:43

etc
Developer
Registered: 2010-11-11
Posts: 3,868
Website

Re: Testers needed: theme management in 4.8.3

I guess (Phil might con/infirm) the main question is what to do on export/import with sync when styles assets (either db or disk) are missing. Should we issue a warning? delete the target’s assets? Should we do the same for forms and pages too? Initially, these three folders were supposed to always exist, but with flat styles and pageless sections they become optional.

This said, it’s an edge case and not 4.8.3 blocker imo.

Offline

#10 2020-08-24 13:02:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,723
Website

Re: Testers needed: theme management in 4.8.3

etc wrote #325543:

what to do on export/import with sync when styles assets (either db or disk) are missing.

For import with sync, the process was planned to be:

  • Take assets from disk, overwrite any matching content in the DB that already exists, and delete any assets in the DB that aren’t in the incoming theme structure.
  • If one of the directories is missing OR an ‘essential’ asset is missing from the incoming theme structure, create corresponding placeholder assets in the database for the missing content, with commented out content to explain what it is.

For export with sync:

  • Take assets from DB, overwrite any matching content in the filesystem that already exists, and delete any disk-based assets that aren’t in the DB’s theme structure.
  • If any of the assets are missing OR an ‘essential’ asset is missing from the DB’s theme structure (e.g. you’re not using Styles), create corresponding placeholder assets in the filesystem for the missing content, with commented out content to explain what it is.

In other words, the integrity of the structure should remain, even if the content is missing. Special consideration is afforded to the assets that are deemed ‘essential’ for Txp’s operation.

Over time, once we figure out whether we want to keep the notion of ‘essential’ assets, we can maybe relax this so that missing directories are skipped. But even at that time, if you’re sync-importing a theme and it has no /styles, for example, and your DB has some, your DB should have no assets in it after import. This maintains the expectation that if you opt-in and check the sync box, it is a destructive process.

Last edited by Bloke (2020-08-24 13:03:51)


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

Board footer

Powered by FluxBB