Header and Footer fields require that every box be filled in order for contents to be displayed.
This is a very repeatable bug for me that took many iterations to understand. In either the header or the footer, simply inputting a tag in one of the boxes would result in no output. For instance, if I wanted the page numbers to appear in the footer on the right-hand side, putting a <$p> in the box would result in no page numbers being displayed. Only when all the boxes in the footer contained input of some kind would page numbers appear in either PDF or DOCX output. For example, in order for page numbers to appear on the right-hand side of the footer, I would have to input something in each box, like copyright info on the left, draft status in the middle, and a page number tag on the right. Only then would page numbers be correctly outputted. The same is true for the Header fields.