What can cause incorrect page numbers?

TLDR: The Table of Contents has the wrong page number for the last section in my book.

I have a small book. The last two sections are “Afterword,” which is two pages long, and “About the Author,” which is a single page. When I make a table of contents (Edit > Copy Special > Copy Documents as ToC) for PDF, it shows page 131 for the Afterword (correct) and page 138 for About the Author (incorrect).

When I look at the ToC in Scrivener with a split pane (which doesn’t show page numbers, just $p tags), clicking any link in the ToC opens to the correct place in the other pane. BUT when I compile to PDF, I get the incorrect page number 138 (which doesn’t exist) and clicking on that link brings me to the second page of the Afterword.

I have spent two days and tried probably a hundred combinations: using/not using roman numerals in the front matter, leaving the About the Author out of the selection for making the ToC then adding it myself, moving the two sections in/out of the manuscript into the back matter, trashing and recreating the Author page, etc. The only way I have found to get the correct page number is to compile the Author page using a format that does not have a Page Break; that way the Author section starts in the middle of the second page of the Afterword, but the page number is correct.

The only thing I can think of that might have caused this is that the setting for starting on a Recto page wasn’t working for these pages, so I tried inserting page breaks in various places. That didn’t work, so I removed them again, and got them to start on recto pages by adding words to a preceding section. I also don’t know why recto doesn’t work for these, but that’s another question.

Has anyone else run into anything like this? If so, have you found a workaround? I thought there was a way to insert a blank page in Scrivener, but if so, I can’t find it again. Any suggestions or discussion would be welcome.

Given the great quantity of variables in the mix, not least of which the structure and length of the content, would it be possible to send us a copy of the project to support, so that it can be tested directly? Even a scrambled version may reproduce the problem, where if you take a copy of the project and run global search and replace on a dozen letters or so to garble it to “xxx xx xxxxxx xx”, that should do. It doesn’t really matter what the text is, so long as it has the same overall “shape”.

Otherwise, the first thing I can think of to try is along the lines of what it sounded like you may have dabbled with a bit, but to an even greater extreme. Select the “Default” compile Format in the left sidebar (no worries you can always get back to your normal settings by clicking on the currently selected format), and pretty much just compile like that, after setting up some basic functional layout assignments.

I believe I have found the problem. At any rate, the numbering is now correct.
TLDR: I think the pagination does not account for page breaks properly.

The original problem was that setting “Afterword” and “About the Author” to start on a recto page did not work. I tried various things to try to fix this, without success. One of the things I tried was inserting Page Break in various places, and removing them when this did not help. Apparently I missed two. I found the first when I found an unexpected blank page in the PDF, and then I went hunting and found and deleted another. Now the pagination is correct.

I still don’t know why setting these pages to recto did not work, but they currently fall naturally on recto pages, so I’ll wait until it happens again to worry about it.

Possibly relevant: Everything from “Foreword” to “About the Author” is under Manuscript, so that they can all be in the index. When I put “Afterword” and “About the Author” in Back Matter and select them along with everything else when I do the Copy Special > Copy Documents as ToC, I get “??” for the page numbers. Is it supposed to do that?

Also: If you still want the manuscript, I’ll be happy to send it to you, along with the Format I’ve been using. I don’t feel any need to redact anything.