Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-09-02 06:54:25

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Theme name containing spaces

Should it really be allowed to create a theme with a name containing spaces ?

  • Theme Panel > New Theme
  • theme name: my theme
  • theme title: my silly theme

Save. Textpattern 4.8.8 happily saves the theme. Sections can be assigned, the theme selector appears on the relevant panels.

When trying to export the theme, things go pear shaped and trigger an error message: skin_unsafe_name: my theme.

–^–
The help file (pop-help) is non-comital (my bolding):

Theme name

A theme’s name is used for the directory name of the theme and other technical purposes (required).

The name shouldn’t contain any special characters or spaces.

Shouldn’t this be tightened a little ? The title is ok when containing spaces, of course. But the name? Other places reject a name with spaces (e.g automatically convert the space to a hyphen for the category name).

PS – PHP 8.1 / TXP 4.8.8


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

Offline

#2 2022-09-02 15:27:18

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

Re: Theme name containing spaces

Yeah. Good catch. That shouldn’t be permitted as it’ll cause all sorts of issues with file names when exporting and importing. We need to be more restrictive here.


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

#3 2022-09-03 01:34:41

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: Theme name containing spaces

Thanks for confirming… Issue 1826 for a rainy summer morning.

BTW – the message pane says skin_unsafe_name. That looks like a place holder string. Something is misplaced in the language file?


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

Offline

Board footer

Powered by FluxBB