Catalogue sorting error

Bug #1483666 reported by Phssthpok
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Triaged
Undecided
Unassigned

Bug Description

Given two series "Sharpe" and "Sharpe Extra", it turns out that "Sharpe Extra" is sorted before "Sharpe" in the catalogue. The same problem occurs with authors, e.g. "Frederik Pohl (ed.)" appears before "Frederik Pohl".

After adding series Sharpe?Extra and Sharpe:Extra to obtain more data, the catalogue contains the following:

<p class="series">
<a class="calibre3" href="part0002.html#sharpeextra_series">
Sharpe:Extra
</a>
</p>
<p class="line_item">
<span class="prefix">
*
</span>
<span class="entry">
<a class="calibre3">
[1] Sharpe's Skirmish
</a>
</span>
</p>
<p class="series">
<a class="calibre3" href="part0002.html#sharpeextra_series">
Sharpe?Extra
</a>
</p>
<p class="line_item">
<span class="prefix">
*
</span>
<span class="entry">
<a class="calibre3">
[2] Sharpe's Christmas
</a>
</span>
</p>
<p class="series">
<a class="calibre3" href="part0002.html#sharpe_series">
Sharpe
</a>
</p>
<p class="line_item">
<span class="prefix">
*
</span>
<span class="entry">
<a class="calibre3">
[21] Sharpe's Devil
</a>
</span>
</p>

(It would appear from this that the sorting uses the HREF, so e.g. "part0002.html#sharpeextra_series" appears BEFORE "part0002.html#sharpe_series", but this is not reliable after punctuation has been removed from the original series name, especially when "_series" is tacked onto the end of the reduced name.)

OS: Windows 7 and 8
Calibre versions: 2.32

Note: this bug was originally pointed out in this thread on the MobileRead forum:

http://www.mobileread.com/forums/showthread.php?t=259476

As it has not been fixed yet, I'm now reporting it.

Tags: catalogs
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1483666

Changing the component for this bug.

 assignee griker
 tag catalogs
 status triaged

Changed in calibre:
assignee: nobody → GRiker (griker)
status: New → Triaged
Revision history for this message
Phssthpok (phssthpok) wrote :

An addition to the previous bug report: where an author is also an editor, the following situation also arises:

 Bill Bryson
      The Mother Tongue
 Bill Bryson (ed.)
      Seeing Further
 Bill Bryson
      A Short History of Nearly Everything

The books for both "Bill Bryson" and "Bill Bryson (ed.)" appear in correct title order as a whole (The Mother Tongue, Seeing Further, A Short History of Nearly Everything), but are then divided up between "Bill Bryson" and "Bill Bryson (ed.)"

Revision history for this message
Marcelo Sanseau (ms100) wrote :

The bug is still present in calibre 3.10, nov 1, 2017;

Revision history for this message
Kovid Goyal (kovid) wrote :

Since GRiker, the person who wrote the epub catalog code is no longer
active, this bug is not likely to get fixed unless someone steps up.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

Unless I misunderstand what the 'catalog' is, then I too have this problem - and I will report it (despite comment #4) because Calibre itself is maintained and this seems like a serious bug.

Here is one instance of an alleged alphabetical sort by author name:
https://i.postimg.cc/2yF0P10G/image.png

Here is another, after I clicked the small arrow (to reverse sort direction, I take it):
https://i.postimg.cc/28tWCzg7/image.png

Even allowing for problems caused by some author fields having first names and others lacking them, I cannot discern the principle upon which the program is sorting.

Revision history for this message
Charles Haley (cbhaley) wrote :

You do misunderstand what a catalog is. It is something generated by Convert Books / Create a catalog of books in your calibre library.

You appear to be talking about the calibre booklist. If you sort by author then it sorts by the value in the field/column "author_sort", which in your case seems to be filled with Lastname, Firstname (the default). If you don't want that then change Preferences / Tweaks / Author sort name algorithm (ID: author_sort_copy_method) to what you want, presumably "copy". After you do that, right-click on any author in the tag browser then push the button "Recalculate all author sort values".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers