Can't get the TOC to work on PDF export [solved]

I did the “select the contents, then paste as TOC” thingy, but the only thing I get out it this.

I know the placeholders are supposed to get switched on export, but this doesn’t happen.

What am I missing?

(Also, I’m not sure why two of lines are shorter than the others.)

Do you have Remove all hyperlinks set in the Transformations compile option pane? That would cause these codes to stop working.

Oh, that makes sense. It’s for print, so I had that ticked.