I have two functions that both need to get the current
pageItemId and it's corresponding
pageListId. My problem is that after the page has loaded, none of these two properties are available through the
$(document).ready(), and at that point both properties are available.
Another thing I noticed is that when I've paused the execution, the
_spPageContextInfo.siteServerRelativeUrl is set to
"/myManaged/Path/mySubweb" while when the page is loaded, it is set to
"/". The same applies to
siteAbsoluteUrl, though they revert back to the root instead of the current site collection and web.
How come that the properties of
_spPageContextInfo changes from these two states, and why aren't
pageListId available when the page has finished loading? Does this have something to do with the fact that they are created under a managed path?