Template talk:BookCat

Missing close brace
The last, i.e. second, time FULLCHAPTERNAME appears in the code, it is followed by only four close braces, but to match all the open braces, there should be five. I found this because I was trying to figure out why pages categorized using are listed on the category pages as being alphabetically under "{" &mdash; for example, here.

(I also couldn't help noticing that the noinclude text says "its" where it means contraction "it's".)

Pi zero (talk) 15:24, 12 November 2008 (UTC)
 * ✅ &mdash; Mike.lifeguard &#124; talk 02:49, 22 November 2008 (UTC)

No include
Please replace the line  with   to stop the interwiki link being added to all books using this template. Thanks, Anonymous101 (talk) 17:26, 7 January 2009 (UTC)
 * ✅ &mdash; Mike.lifeguard &#124; talk 19:43, 10 January 2009 (UTC)
 * Thanks. Anonymous101 (talk) 18:34, 11 January 2009 (UTC)

Subcategories
A "nice-to-have" woud be, to extend the template with some sub-categories.
 * example

That would create in the Songbook:
 * Maybe a single parameter would be sufficient
 * Maybe a single parameter would be sufficient

the rest could be completed by an outer template

each parameter expand the output with "/parameter value"

}{{ ... Unfortunately in English I am not fit enough, to make the programming by myself. --Mjchael (talk) 20:26, 10 August 2009 (UTC)

interwiki
Editprotected Please add a link to pt:Template:AutoCat. Helder 17:22, 3 September 2009 (UTC)
 * [[Image:Yes_check.svg|15px| ]] Done. -- Adrignola talk contribs 16:04, 17 April 2010 (UTC)

template-filing=deep
The parameter } does not seem to be working.  Liam987  12:39, 12 April 2012 (UTC)


 * It looks to me as if it's doing just what the documentation says it does. According to the documentation, deep filing would send
 * Template:Geography of France/Index chapters  to   Category:Geography of France/Templates
 * Template:Geography of France/Index/chapters  to   Category:Geography of France/Templates/Index
 * This seemed to me to be the most useful deep-filing behavior on templates, but I provided deep template filing on speculation since I had no examples on hand that called for it. The two templates you've deep-filed in that one book are, if I'm not mistaken, the only deep-filed templates on the entire project; we can tell that because, to aid in situations just like this one, BookCat automatically populates Category:Pages with deep filing.  --Pi zero (discuss • contribs) 14:00, 12 April 2012 (UTC)
 * Oh. I wasn't thinking, for some reason I forgot that the pages aren't third-level subpages. I have moved them. Thanks!  Liam987  14:33, 13 April 2012 (UTC)

Why do we need the template-filing parameter?
What is the use of having a separate  parameter? Couldn't the  parameter just be used?  Liam987  12:57, 28 April 2012 (UTC)
 * They seem to be potentially separate decisions, whether to deep-file book pages and whether to deep-file templates. It was a guess, how the controls for them ought to be set up; I can think of several other ways to arrange the controls, but given we have something, we'd want to have high confidence before changing it that the change would then be getting it right.  --Pi zero (discuss • contribs) 14:20, 29 April 2012 (UTC)

Bug of the book references in a category
Since December, when the book TOC contains some references without any. Sometimes I've done that around individual footnotes, which is a pain; sometimes I've done it around whole sections of the book main page. I've considered putting the subjects information on a separate page somewhere rather than on the book main page; the book category could then transclude this other page without the wiki software forcing any footnotes on it. That however is a major organizational shift, since meta information has traditionally been on the book main page; something to do only after a great deal of careful planning. Navlists are an example of meta-information on a separate page, already, and I'd no sooner done that than I started thinking about revising how I was doing it. --Pi zero (discuss • contribs) 19:22, 19 June 2017 (UTC)

Wrong sort keys
editprotected

Pages are assigned to sort keys of level-2 subpages instead of their own. For example, level-3 pages are assigned to the subpage name of level-2 pages:

Category:Book:C Programming/math.h

Category:Book:Software Engineers Handbook/Language Dictionary

Category:Book:LibreOffice/Writer

--Strange quark (discuss • contribs) 08:25, 14 September 2017 (UTC)


 * This is how it has "always" been done in most books, i.e., since before I came here (how did I get to be an "old timer" here? I was just passing through, like James Garner's character in Support Your Local Sheriff! who insisted he was  just passing through town on his way to Australia).  Recently I isolated the behavior in BOOKSORTKEY.  I believe (but would have to check) the deepest-level name is used when  .  It's possible we would want to provide a separate mechanism for changing the sort key from one scheme to the other without deep filing, but that in turn would raise some other design issues.


 * A very few books use deep filing, and I've observed two problems with it. First, every call to BookCat on every page of the book has to remember to specify deep filing, or that page gets misfiled.  Second, when deep-filing a book, there is often a top-level page for a subsection, and that page gets automatically filed in its parent instead of in the subcategory with its subpages; it usually makes more sense to file that top-level page either in the subcat (just as the main page of a book appears in the same cat as its subpages), or in both the subcat and the supercat.  The trouble with filing in the subcat is that not all pages of the book will have such a subcat, and the template can't tell whether there is such a subcat without looking outside the page itself; that is information about the book as a whole rather than about the individual page in itself.  We do have BOOKCATEGORY already looking outside the current page to see whether the associated book uses the old or new book-category naming scheme, but that is meant to be a temporary measure while we're transitioning from old to new scheme; I would expect to remove that external check when we're done with the transition.


 * Possibly both of these issues &mdash; sort-key level with flat filing, and parent-versus-child deep filing for head-pages &mdash; should be decided at some central location for the book as a whole (subject, probably, to being overridden by parameters specified at the particular page). This however would be subject to the usual controversies of centralized control; it would create a single-point-of-failure, and ought to be carefully planned to preserve local flexibility.


 * It might make sense to integrate such a centralized device with an upgraded navlist facility, using the navlist as the central point for all these things. However, the navlist needs to be redesigned to use a more friendly format, and the centralization issues are particularly prominent for navlist.  If we're going to go with that, we might want to set up a general facility for any page associated with a book to extract book-wide parameters from the navlist without having to know about the format used by the navlist.


 * A likely path forward on this, I suggest, would be to add a parameter now for locally switching to the other style of sort key, so one can move forward with that while considering what to do with navlist. --Pi zero (discuss • contribs) 12:36, 14 September 2017 (UTC)


 * The  parameter doesn't fix the sort keys, as in the C Programming example above.    doesn't seems to work either. --Strange quark (discuss • contribs)


 * Ah, now that is clearly a bug to fix. --Pi zero (discuss • contribs) 15:09, 14 September 2017 (UTC)
 * The code to fix would be in BookCat/default. --Pi zero (discuss • contribs) 16:03, 14 September 2017 (UTC)
 * It looks as if I introduced a bug when I edited that template early this year. Hopefully fixed now.  --Pi zero (discuss • contribs) 18:51, 14 September 2017 (UTC)
 * Individual pages won't immediately be resorted within their categories unless one does a null edit on them. I did that for one of the above-listed categories, to confirm the problem was fixed.  But I'm not even sure they'd ever get resorted if not edited.  --Pi zero (discuss • contribs) 21:03, 14 September 2017 (UTC)

Rearranging parameters
I'm about to rearrange the parameters of this template for consistency with our magic word templates. Those templates take as their first unnamed parameter an alternative to the current page; BookCat is peculiar in taking a sort-key as its first unnamed parameter. Therefore, I propose to use parameter name  for the sort key, and use the first unnamed parameter for the same purpose that most of our magic word templates do. Steps of the process: --Pi zero (discuss • contribs) 15:44, 28 January 2018 (UTC)
 * 1) Find any passing of an unnamed parameter to this template.
 * Requires a single edit to master template BookCat. (At this writing, underway via Category:Pages passing sort key to BookCat.)
 * 1) Modify the master template to extract the namespace from the unnamed parameter if supplied, determine pagename likewise, and pass   and   to subtemplates appropriately.
 * Requires a single edit to the master template.
 * 1) Modify subtemplates to use the new parameters.
 * Requires one edit to each involved subtemplate.
 * 1) Update the documentation.
 * Alternative name for :  .  --Pi zero (discuss • contribs) 17:01, 28 January 2018 (UTC)
 * Step two has been done, major upgrade to the master template. --Pi zero (discuss • contribs) 14:27, 29 January 2018 (UTC)
 * (Alas, a second edit.) --Pi zero (discuss • contribs) 14:59, 29 January 2018 (UTC)
 * As usual, things are not going well. After two additional bug fixes to the master template, several pages are in the (singularly useless) Category:Pages with script errors, and at this point the only way I'll know whether that's related to this upgrade is to undo the upgrade and see if the problem goes away.  --Pi zero (discuss • contribs) 16:48, 29 January 2018 (UTC)
 * Afaik this rearrangement is completed. --Pi zero (discuss • contribs) 13:17, 30 January 2018 (UTC)