The "letter" anchors that are generated for the alphabar are not being output correctly. I am getting the following problem...

For the "A" group, each term has this code before it:

<a id="letterb"></a>
<a id="lettera"></a>
<a id="termXX"></a>

Likewise, for each of the following letters, the next letter's anchor is listed, then the current letter's anchor, then the term anchor. For *every* term. The letter anchor should occur *once* and only once, for the first term of a given letter.

Comments

slower’s picture

Title: Letter anchors are incorrect » Workaround
Component: User interface » Code

The problem is on line 316 of glossary.module, where we are looping through and outputting the terms.:

$output .= _glossary_anchor(chr(ord($lastletter)+1) , $firstletter);

It's printing anchors for the next letter and the current term's first letter. It should only print an anchor for the current letter. To achieve this, you can change line 316 to:

$output .= _glossary_anchor($firstletter, $firstletter);
slower’s picture

Title: Workaround » Letter anchors are incorrect
Frodo Looijaard’s picture

Assigned: Unassigned » Frodo Looijaard

Fixed by reimplementing the alphabet bar (issue 13083).

Thanks for your feedback and help!

  Frodo

Anonymous’s picture