Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-11-05 05:43:09

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

[solved] child category when parent category has [ ] in title

With recent Textpattern, it appears impossible to create child category when parent category has [ ] in its title.

(article) parent category: title = foo [bar baz] and name = foo-bar-baz

I try to create a child category something, the process goes through but the child category is not visible anywhere (in the UI). Refreshing the page, a round trip to some-other-panel and back to the Categories panel, visit with another browser (clean cache et all). Nothing. And, of course, the newly created category is not available for use on the Write panel.

Try again, no go, the system complains the category name is in use.

Puzzling, the category is visible in the DB.

Textpattern 4.8.7 and 4.8.8-dev + 4.9-dev / PHP 8.0.x

But create the same (new) category as a top level category, then go to its edit panel and change its parent category works fine and the newly created category appears as it should. Same behaviour using the multi-edit widget.

Note: the parent category has already 2 child cats, and all have been create a (long) time ago – Textpattern 4.6 time frame probably.

Last edited by phiw13 (2021-11-07 02:17:22)


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

Offline

#2 2021-11-05 05:54:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,777
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

Would it work if you temporarily renamed the category to foo-bar-baz, create the children and then go back to the parent and add your square brackets?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#3 2021-11-05 06:03:43

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

Re: [solved] child category when parent category has [ ] in title

colak wrote #331887:

Would it work if you temporarily renamed the category to foo-bar-baz, create the children and then go back to the parent and add your square brackets?

Sure, that works. I should have noted that temporarily changing the title of the parent category to anything without the offending characters (the square brackets) works fine.

edit: although changing the title of the parent category (dropping the [and ]) did not, as far as I remember, bring back the already created and “invisible” cats.

Last edited by phiw13 (2021-11-05 06:06:23)


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

Offline

#4 2021-11-05 09:22:39

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,777
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

I have just tested it on the demo site on both v4.8.7 and the dev release, and admittedly, I could not reproduce the bug. Are you certain that it is not a server issue?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#5 2021-11-05 09:37:41

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

Re: [solved] child category when parent category has [ ] in title

I tested that on 2 different servers with the various Textpattern versions – live and local servers. Those 3 testing environments (two are live sites) all have had that set of categories for a long time.

(on a newishly created testing site locally, running TXP 4.9-dev, the issue does not reproduce, so far.)


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

Offline

#6 2021-11-05 09:43:25

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,440
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

Hi

I tested on a 4.8.8-dev local install and got no problem with foo [bar baz] and a child cat Something.

Maybe it s Gremlins!

Offline

#7 2021-11-05 09:58:36

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

Re: [solved] child category when parent category has [ ] in title

Dragondz wrote #331891:

Hi

I tested on a 4.8.8-dev local install and got no problem with foo [bar baz] and a child cat Something.

Maybe it s Gremlins!

:-)

I might think so /.>

More seriously, probably something in those older databases or the category name/title as generated by older versions of Textpattern.

Last edited by phiw13 (2021-11-05 09:58:58)


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

Offline

#8 2021-11-05 10:04:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,777
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

phiw13 wrote #331892:

:-)

I might think so /.>

More seriously, probably something in those older databases or the category name/title as generated by older versions of Textpattern.

Older dbs might be the problem. What Mysql (or MariaDb) version are you using?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#9 2021-11-05 10:10:23

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

Re: [solved] child category when parent category has [ ] in title

colak wrote #331893:

Older dbs might be the problem. What Mysql (or MariaDb) version are you using?

MySQL 8 locally, 5.7 (MariaDB equivalent) on the live server. In both cases, the content was originally created with MySQL 5.x DBs.


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

Offline

#10 2021-11-05 15:13:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,777
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

phiw13 wrote #331894:

MySQL 8 locally, 5.7 (MariaDB equivalent) on the live server. In both cases, the content was originally created with MySQL 5.x DBs.

Would it have anything to do with the character encoding of the online db? ie. is it utf8?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#11 2021-11-06 01:08:42

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

Re: [solved] child category when parent category has [ ] in title

colak wrote #331895:

Would it have anything to do with the character encoding of the online db? ie. is it utf8?

Nope. the behaviour is the same on the 3 instances where the issue happens, across different versions of Textpattern.


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

Offline

#12 2021-11-06 06:30:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,777
Website GitHub Twitter

Re: [solved] child category when parent category has [ ] in title

I’ve never used MariaDB, but would it be it?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB