The Problem is that you query for Post Status null
. Try setting this to publish
or inherit
, because get_permalink
is a function for published items, not for any post status.
This is because Permalinks to items with a status like draft
should not be shown to the user.