Error #!: only content controls are allowed directly in a content page that contains content controls. script
Why : when you have script block outside the content controls in your application pages in sharepoint 2010.
Add your Script block on the PlaceHolderAdditionalPageHead
In your application page.
Error #2: Cannot make a cache safe URL for “1033/sp.debug.js”, file not found. Please verify that the file exists under the layouts directory.
Why this happen? Because SP.debug.js doesn’t exist under layouts folder in sharepoint 2010.
Fix: Copy your SP.debug.js from this file path:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
and paste it on the following directory:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033
Hope this helps.