Replace undefined variable $ValidPageID with $Page
Fix "view the page" using old UrlCode.