fix page id detection for those linking to pages without :id/:title