SharePoint 2010 development errors and fixes

Hi Folks,

I want to share 2 errors i was getting while working with the ECMA Javascript Client Object Model in SharePoint 2010.

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.

Solution:
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.



Regards,
Mostafa arafa

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>