Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2017-12-25 15:04:24

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

Re: Hello Themes!

Ah, regarding the 503 thing, I think Txp’s die handling tag probably needs changing to pick up the theme in use. Oversight on my part. Will try and fix.

The only issue is that the skin is tied to a Section but when a page is missing (for example) or issues another error page, there may not be a Section (as such). So how would we know which skin to check? We can fallback on ‘default’ for sure, but it should (at very least) use the skin_editing pref and pull the skin details from there so admins will see the correct error pages from their last-used skin. But I’m not sure what to do about the rest of the user base under general error conditions. Anyone just typing a bogus URL in needs to be directed to one of the error pages. e.g. Typing https://example.org/ytqwukklk into a browser that uses section/id/title permlink scheme: which skin would we use to return the error page?

As for the other thing, there’s probably an assumption made that the version is just numbers in the meta data. We need to sanitize that if it’s not done already. If it’s not that I’ll replicate your situation and figure out what’s going on.

Love having you around to highlight and help fix all this stuff. Textpattern would be far poorer without you, thanks.

Last edited by Bloke (2017-12-25 15:21:05)


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

Online

#17 2017-12-26 09:16:49

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: Hello Themes!

Here is a strange behavior.
Starting with a fresh installation (latest 4.7-dev) and choosen the option “empty theme” (two indispensables page templates only: “default” and “error_default”), I can’t render any errors page: I’ve got a blank page without any HTML markup (even if I inject the content keeping from the ‘default’ website model).
Note: this seems not occurs if we choose a ‘normal’ installation with the ‘default’ website model and create a theme over it.

Last edited by Pat64 (2017-12-26 09:26:07)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#18 2017-12-26 09:34:24

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

Re: Hello Themes!

Pat64 wrote #308429:

I can’t render any errors page

Same issue as phiw13 raised above I think. We need to find a way to handle error pages from a theme somehow.


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

Online

#19 2017-12-26 10:32:10

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: Hello Themes!

Fine.
Otherwise, themes support is super cool (and new tags very useful) ;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#20 2017-12-26 17:10:00

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

Re: Hello Themes!

Should have fixed the error page scenario now. Please test.

Will do some more investigation into sanitizing the page/form names.


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

Online

#21 2017-12-27 08:44:19

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

Re: Hello Themes!

Bloke wrote #308437:

Should have fixed the error page scenario now. Please test.

The error pages seem to work fine now, as far as I can tell, at least for the scenarios I outline above (site in maintenance mode, user logged in, checked for 404; in other browser, the error_503 page displayed as expected). Haven’t had the opportunity to test Pat‘s scenario yet.


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

Offline

#22 2017-12-27 10:04:09

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: Hello Themes!

phiw13 wrote #308441:

The error pages seem to work fine now, as far as I can tell, at least for the scenarios I outline above (site in maintenance mode, user logged in, checked for 404; in other browser, the error_503 page displayed as expected). Haven’t had the opportunity to test Pat‘s scenario yet.

Yep. Tested: all works fine as expected!

Thank you lot, Stef ;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#23 2017-12-27 12:41:55

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: Hello Themes!

Excepted: any call to forms doesn’t work within such an ‘error_default’ page template.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#24 2017-12-27 18:52:00

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

Re: Hello Themes!

Pat64 wrote #308446:

Excepted: any call to forms doesn’t work within such an ‘error_default’ page template.

Yes, that’ll probably fail for the same reason as the txp_die itself used to fail before I patched it: there’s no concept of “which theme” the system is using under error conditions.

I’ve got around it in the error handler code by guessing the theme (i.e. using the one you’re using as an administrator or the one that was in force just prior to the error being thrown or – failing that – the one set as default). We might be able to use the same logic here. The <txp:output_form> tag already falls back on “last used” (if it can), but doesn’t take into account the admin theme you may be testing or the default theme. I could add that.

Would it be generally useful, do you think, to add a theme attribute to the tag? It’d default to the best theme it could find, but you could temporarily override the theme that it chose if you wanted. It seems useful when I say it like that, but I’m not sure if it is in practice.

Any thoughts anyone?


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

Online

#25 2017-12-28 02:03:00

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

Re: Hello Themes!

I just did a fresh install of the dev and chose empty during the installation.

1. Go to themes and it is automatically named default with the version and author boxes filled in with the values you would get normally. I went ahead and changed the contents of the default page and added a second.

2. I went back to themes and changed the name. I got a couple of mysql errors in a popup. Everything was wiped out including error_default. When I tried to save the new archives page again it wouldn’t save. Then I tried saving a default page and I got the standard list of pages again. I was then able to save the archives page and everything was back to normal except I still need to recreate error_default.

Offline

#26 2017-12-28 08:08:15

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

Re: Hello Themes!

michaelkpate wrote #308455:

chose empty during the installation… changed the name. I got a couple of mysql errors in a popup. Everything was wiped out including error_default.

That doesn’t sound good. I haven’t tested the empty theme yet but there might be something awry there. I’ll give it a grilling later. Thanks for testing.


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

Online

#27 2017-12-28 09:16:55

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

Re: Hello Themes!

Another small issue:

Go to the Section panel, and try to sort the table by skin. The page reloads, put reverts back to the previous setting.


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

Offline

#28 2017-12-28 15:35:54

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

Re: Hello Themes!

phiw13 wrote #308458:

Go to the Section panel, and try to sort the table by skin. The page… reverts back to the previous setting.

Fixed, thanks.


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

Online

#29 2017-12-28 21:44:52

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Hello Themes!

last v4.7 dev.

Import of files in default skin

Then :

I try to duplicate the default skin:

3 errors like this

User_Error "Table 'remorquecalifornie.txp_page' doesn't exist".

a final message :

skin_updated: alysse-v1-2018
pages_update_failed: (0) default_copy
forms_update_failed: (0) default_copy
styles_update_failed: (0) default_copy

(Before, I try to create a new style then import files : must change the dir/files right to 777)

Offline

#30 2017-12-29 00:47:50

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

Re: Hello Themes!

Bloke wrote #308462:

Fixed, thanks.

Yup, now works fine. TY.


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