PB Bug: The limit on TOC entries is calculated incorrectly

Mark Barnes
Mark Barnes Member Posts: 15,432 ✭✭✭

There's a 256 character limit on entries in the table of contents. The problem is that the limit is calculated before Logos markup is handled, not afterwards. So if your markup is lengthy , then your TOC entries will be truncated.

In my case I had an entry which said:

[[@Page:3215]][[@Headword:Church Father]][[@Headword:Early Church Fathers]][[@Headword:Early Church Father]][[@Headword:Greek Fathers]][[@Headword:Holy Fathers]][[@Headword:Fathers of the Church]][[@Headword:Latin Fathers]][[@Headword:Church Fathers]]Church Fathers

Which was truncated to 'Churc'.

It's an even bigger problem when the 256th character is in the middle of a bit of Logos' markup. So another example:

[[@Page:3254]][[@Headword:Church of God (7th day) - Salem Conference]][[@Headword:General Conference of the Church of God (Seventh-Day)]][[@Headword:Church of God (7th day)]][[@Headword:Church of God (Seventh Day)]][[@Headword:Church of God (7th day) – Salem Conference]][[@Headword:Church of God (Seventh-Day)]]Church of God (Seventh-Day)

This became a TOC entry of '[[@Headword:Church of God (7th day) – Sal'.

Although I'm giving headwords as an example, the problem would also be likely to occur if you had URL links in your headings.

The solution, presumably, is to parse the markup, then truncate, rather than the other way around.

This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!

Comments

  • Beloved Amodeo
    Beloved Amodeo Member Posts: 4,181 ✭✭✭

    There's a 256 character limit on entries in the table of contents. The problem is that the limit is calculated before Logos markup is handled, not afterwards.

    So Mark,

    Is the solution as simple as implied, namely to apply the limit after the markup?

    Meanwhile, Jesus kept on growing wiser and more mature, and in favor with God and his fellow man.

    International Standard Version. (2011). (Lk 2:52). Yorba Linda, CA: ISV Foundation.

    MacBook Pro MacOS Sequoia 15.2 1TB SSD

  • Mark Barnes
    Mark Barnes Member Posts: 15,432 ✭✭✭

    Beloved said:

    Is the solution as simple as implied, namely to apply the limit after the markup?

    That's for the programmers to decide. I have a habit of declaring things to be simple, only to be told there are five good reasons why it wasn't done that way.

    A workaround for us, would be to move the headwords from the beginning of the line to the end.

    This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!

  • Angela Murashov
    Angela Murashov Member Posts: 1,532

    There's a 256 character limit on entries in the table of contents. The problem is that the limit is calculated before Logos markup is handled, not afterwards. So if your markup is lengthy , then your TOC entries will be truncated.

    I will create a case for Development to investigate this issue.

  • Angela Murashov
    Angela Murashov Member Posts: 1,532

    There's a 256 character limit on entries in the table of contents. The problem is that the limit is calculated before Logos markup is handled, not afterwards. So if your markup is lengthy , then your TOC entries will be truncated.

    I will create a case for Development to investigate this issue.

    This should be fixed in 6.0b.