In many cases, when we use automatic paging based on word count, a post that should be long enough to split into multiple pages is not split and shows on a single page. I have been able to track this down to an issue with how the module determines whether multiple pages are necessary. The divide operation that determines page count based on the word or character count does a straight float to integer conversion. Per PHP, this *always* rounds down. Therefore, when a post does in fact have enough words/characters to spill over to a second page, it does not unless there is enough to fill that second page.

A patch is attached to fix this by calling ceil() before converting to an integer so the number of pages is always rounded up if there is a remainder.

CommentFileSizeAuthor
paging-float-conversion.patch939 bytesmgriego

Comments

jenlampton’s picture

Status: Needs review » Closed (duplicate)

Looks like this is a dupe of #529464: Dropped pages.