Hi
My users are reporting some strange behaviour with some pages created with the same custom layout pages and custom master page in a sp2013 publishing site
Essentially, I have function referenced in the master page that does stuff using CSOM on all my pages ( see below). …Has worked fine till now.
for example I have created 2 welcome pages from the same custom layout page and master page.
/site/Pages/home.aspx …. works perfectly
/site/Pages/Home2.aspx does not fire the function below in the document ready which I think is related to the load state of “sp.js” . Just to confuse things if I check out Home2.aspx …. the ExecuteOrDelayUjtilLoaded fires! I checkin and publish the script stops firing…. Aaaahhhhhhhh!!!!
$(document).ready(function() {
ExecuteOrDelayUntilScriptLoaded(function () {
/* your code here whch has to be run after the CSOM runtime gets loaded */
MyFuction();
}, “sp.js”);