Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2020-08-25 03:32:11

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325554:

And it probably is marginally slower than directly linking to a stylesheet / js file / …

Um, that actually allows you to link directly to the file.

I guess it depends on whether you are creating something strictly for yourself that you never plan to change or that either might change or you want to eventually make available for other people. By keeping everything together in the theme folder and linking directly to it, it makes it simple to install or swap out.

Offline

#17 2020-08-25 03:57:10

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

Editor’s Note: I meant to reply to this but accidentally clicked edit instead and can’t restore the original.

Last edited by michaelkpate (2020-08-25 12:16:22)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#18 2020-08-25 07:38:20

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

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325556:

BTW I think the Styles tab should be optional – or merged with some of the different “media forms” the can be created into a “resources” tab to cover stylesheets, scripts, SVG files…

Yes, — assets or resources are more logical names than styles in the themes folder but I don’t know how that would affect backwards compatability if used globally.


Dozy P My attempt at music

Offline

#19 2020-08-25 13:14:45

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

Re: Testers needed: theme management in 4.8.3

zero wrote #325557:

Yes, — assets or resources are more logical names than styles in the themes folder but I don’t know how that would affect backwards compatability if used globally.

All these can currently be considered as custom-type forms, but we have no mechanism (yet) to alter preferences on theme import.

Offline

#20 2020-08-25 13:49:24

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

Re: Testers needed: theme management in 4.8.3

etc wrote #325562:

All these can currently be considered as custom-type forms, but we have no mechanism (yet) to alter preferences on theme import.

Making them into custom-type forms would go against the separation of structure and content, as phiw13 stated. Of course, styles doesn’t fit with content either, so perhaps pages, forms, styles and assets/resources would be more appropriate? That doesn’t break anything. And eventually make styles into custom-type forms maybe, if there no longer seems a need for styles?


Dozy P My attempt at music

Offline

#21 2020-08-25 14:03:25

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

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325556:

Editor’s Note: I meant to reply to this but accidentally clicked edit instead and can’t restore the original.

Something strange happened to me too, when replying to Stef’s comments in this post. I started writing after I’d done the importing, exporting and deleting, and then couldn’t quite remember exactly what I had done, so I did it all again, whilst writing the post at each step. Because it took so long I think, I ended with my post but the original disappeared.


Dozy P My attempt at music

Offline

#22 2020-08-26 05:05:38

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

So, after seeing this comment, I did a test again. Up to someone else to decide if the 4.8.3 behaviour is expected or “correct”or…

with TXP 4.8.3-pre GH fresh download – remove all references to stylesheets for each section on the “sections” panel and delete all / any existing stylesheets on the “styles” panel (the sections pages link to a stylesheet directly anyway).

on export:

Themes exported: theme_name.
No style data found for: theme_name.

on import (after renaming the theme for my convenience):

Themes imported: theme_name_2.
Warning: cannot read from directories/files /Users/user_name/Sites/test-local/themes/theme_name_2/styles.

a new default.css is created, with as content:

/* Contents of the css tag goes here. See https://docs.textpattern.com/tags/css */

–––
on TXP-dev 4.9.0

similar behaviour on export.
on importing, no warning or error.
and same as with 4.8.3 latest GH code, a new default.css is created

edited to clarify the configuration

Last edited by phiw13 (2020-08-26 06:06:36)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#23 2020-08-26 05:16:30

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

hold on… on the “styles” panel, in my comment above I had selected the newly imported theme_name_2 to see if yes/no a stylesheet had been created.

issue:

when toggling back to theme_name (live theme in use, with NO stylesheet included in the DB anymore) I got a whole bunch of Notices and Warnings

Notice "Undefined index: theme_name"
Warning "in_array() expects parameter 2 to be array, null given"
Warning "reset() expects parameter 1 to be array, null given"
Warning "array_slice() expects parameter 1 to be array, null given"

etc, all in /Users/username/Sites/test-local/textpattern/vendors/Textpattern/Skin/AssetBase.php around line 314 and down

that is with the 4.8.3 codebase

when the loading the panel ‘normally’ with theme_name already selected no notices or warning.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#24 2020-08-31 06:18:28

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325569:

issue:

when toggling back to theme_name (live theme in use, with NO stylesheet included in the DB anymore) I got a whole bunch of Notices and Warnings […]

Unsurprisingly, now that the code has landed / has been merged with 4.9.0-dev, I have seen the same warning(s) and notices.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#25 2020-08-31 08:50:46

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

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325673:

Unsurprisingly, now that the code has landed / has been merged with 4.9.0-dev, I have seen the same warning(s) and notices.

Do you mean, you have tested it on dev before merge and it worked fine?

Offline

#26 2020-08-31 08:57:13

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

etc wrote #325675:

Do you mean, you have tested it on dev before merge and it worked fine?

When testing here, I do not remember seeing those warning/notices messages on the dev.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#27 2020-08-31 09:11:28

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

Re: Testers needed: theme management in 4.8.3

phiw13 wrote #325677:

When testing here, I do not remember seeing those warning/notices messages on the dev.

I see these errors on release-demo (4.8.2) too, so it must be unrelated to 4.8.3 merge.

Offline

#28 2020-09-01 02:55:24

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

etc wrote #325680:

I see these errors on release-demo (4.8.2) too, so it must be unrelated to 4.8.3 merge.

Hmm. Maybe I mis-remember the exact steps I did when I tested. But you’re right. Using Time-machine I reverted the install to a slightly older state, and tested again and indeed, the same collection of warnings appear. I never noticed those things as until recently TXP required to have a stylesheet in the DB.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#29 2020-09-05 12:44:46

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

Re: Testers needed: theme management in 4.8.3

I’ve done something, please retest.

Offline

#30 2020-09-06 08:52:18

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: Testers needed: theme management in 4.8.3

etc wrote #325792:

I’ve done something, please retest.

Thanks.
I don’t think I will be able to test before Tuesday. A big bad girl is getting in the way. Hopefully a low flying tree won’t mess with electricity/fiber cables…


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB