Category TOC (table of contents) no longer works for categories with punctuation in the category name

+2 votes
264 views

The category table of contents template seems to have quit working for categories that have punctuation (such as a comma) in the category name. It still generates a clickable alphabetical list in these categories, but the links go to an error page ("The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one or more characters which cannot be used in titles.").

For example, see Category: Braintree, Massachusetts.

Category TOC still works in categories without commas in the title. For categories with commas in the name, I've tried omitting the category= parameter, entering that parameter in plain text (e.g., category=Lancaster, Pennsylvania -- that format used to work) entering it with a comma and underscore (e.g., category=Lancaster,_Pennsylvania) and entering it in coded format (e.g., category=Braintree%2C_Massachusetts). None of these works.

in WikiTree Tech by Ellen Smith G2G Astronaut (1.5m points)

2 Answers

+2 votes
Not sure what the problem is. It is working fine for me.
by anonymous G2G6 Pilot (279k points)
So when you go to the Braintree category and click on a letter of the alphabet, you see something that's not an error page?
No, sorry, you are right.
+1 vote
Hi Ellen,

That's odd. Do you remember it working before?

In this case, we could remove the TOC. It would be confusing even if it works, I think, since there are only two pages.

Chris
by Chris Whitten G2G Astronaut (1.5m points)

Yes, this template always worked before (but I'm not sure when I last checked it). I think it's possible that it stopped working whenever the template was edited to eliminate the need for the category= parameter.

These two categories are not the only categories with commas in the category name that use TOCs -- Category: Boston, Massachusetts runs to 3 pages and could soon spill over to a 4th page. I think that the ability to navigate a large category with a TOC (instead of moving forward one page at a time) is vitally important if categories are going to be useful to people. Category TOC works at Wikipedia for categories  with commas -- for example, in https://en.wikipedia.org/wiki/Category:People_from_Albany,_New_York

I think it's got http: in it that needs changing to https: - apparently the encoding is different.
Yes, from looking at the changes documented in https://www.wikitree.com/index.php?title=Template:Category_TOC&action=history it's clear that the template has http embedded in it.

And the template was edited in September to eliminate the need for category=, so it's possible that the problem crept in then, but wasn't detected.

It's a wider issue.  If I request

http://www.wikitree.com/index.php?title=etc%etc

(typed into the address bar) the % gets encoded to %25 in the process of being redirected to https: - which isn't what you want if it's part of a code already.

This could break external links and bookmarks to the site.

 

RJ, thank you for identifying the issue! You and Ellen make things so easy for me.

I updated the template so it uses https. This has fixed the problem with the TOC.

We will need to fix the deeper redirect issue, though. That's on the to-do list. Thanks again, RJ.
Thanks, Chris -- and RJ!
This should now be fixed.

Thank you again, RJ and Ellen. You are both remarkably valuable contributors to G2G.

Related questions

+3 votes
2 answers
312 views asked May 11, 2018 in WikiTree Tech by anonymous G2G6 Pilot (279k points)
+5 votes
2 answers
150 views asked Feb 20, 2021 in WikiTree Tech by Gil Davis G2G6 Mach 1 (14.7k points)
+11 votes
2 answers
207 views asked May 13, 2016 in WikiTree Tech by Ellen Smith G2G Astronaut (1.5m points)
+2 votes
3 answers
118 views asked Jul 22, 2014 in WikiTree Tech by Maryann Hurt G2G6 Mach 9 (90.8k points)
+3 votes
2 answers
247 views asked May 28, 2014 in WikiTree Tech by L Adcox G2G2 (2.0k points)
+9 votes
1 answer
+2 votes
2 answers
216 views asked Sep 15, 2020 in WikiTree Help by Joanna Gariepy G2G6 Mach 1 (13.4k points)

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright

...