Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-03-21 14:47:59

dinoact
New Member
Registered: 2010-03-17
Posts: 9

category_list in 4.8.8

I’m having an issue with category_list after upgrading to 4.8.8 (this worked in 4.8.7). It’s likely something I’m doing wrong with some changed syntax, but I haven’t been able to figure it out when trying some different tests.

This is in a page template:
I’m trying to just display child categories of a parent and then hide the parent value so it only lists the children. There’s only 1 level of children, so I left off the children attribute (adding it doesn’t seem to fix it though). Taking away the “exclude” attribute just lists the parent. The entire list displays fine if I remove the parent attribute.
<txp:category_list exclude="location" parent="Location" wraptag="ul" break="li" form="category_list" />

Same thing here. This is in both a page and form, and only works if I remove the parent attribute.
<select> <option>Select a Location</option> <txp:category_list parent="Location" exclude="location" break=""><option value="/category/<txp:category title="0" />"><txp:category title="1" /></option></txp:category_list> </select>

Last edited by dinoact (2022-03-21 14:52:25)

Offline

#2 2022-03-21 16:31:11

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

Re: category_list in 4.8.8

Hi

In the first code you wrote : exclude =‘location’ and parent =‘Location’ ! (L instead of l in location).

Cheers.

Offline

#3 2022-03-21 16:55:10

dinoact
New Member
Registered: 2010-03-17
Posts: 9

Re: category_list in 4.8.8

Thanks! That did it. Sorry, stupid miss on my part. It must have previously worked either on both name and title, or was case-insensitive.

Offline

#4 2022-03-21 18:11:07

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

Re: category_list in 4.8.8

Hi,

That happen for everyone, for why it worked before only Oleg can answer that question.

Cheets.

Offline

#5 2022-03-22 10:23:11

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

Re: category_list in 4.8.8

dinoact wrote #332960:

It must have previously worked either on both name and title, or was case-insensitive.

Dragondz wrote #332961:

why it worked before only Oleg can answer that question.

My only guess is that your site is old and Location category was created before category names became lowercased (4.5 or earlier?). If you have somehow modified Location category after the switch to 4.8.8, it has been saved as location and your code stopped working. But this would happen in 4.8.7 too, imo.

To reduce the risk of mismatch you can shorten the tag to

<txp:category_list exclude parent="location" ... />

Offline

Board footer

Powered by FluxBB