'_spPageContextInfo' is undefined

This topic contains 1 reply, has 2 voices, and was last updated by  Joe McShea 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1967

    EDavis
    Participant

    Hello,

    I’m having difficulty getting SPEasyForms to work on my dev farm. This is the first time I’ve used SPEasyForms.

    Issue: won’t save form or theme/form width changes.
    error: ‘_spPageContextInfo’ is undefined

    jquery.SPEasyForms.min.js:35 Uncaught ReferenceError: _spPageContextInfo is not defined
    at Object.get (jquery.SPEasyForms.min.js:35)
    at Object.initAsync (jquery.SPEasyForms.min.js:35)
    at Object.init (jquery.SPEasyForms.min.js:16)
    at SPEasyFormsSettings.aspx?ListId={0b6bbcd4-1f0b-4bc4-835d-620f6ff961c1}&SiteUrl=http://sp2013-1/recon&Source=http%3A%2F%2Fsp2013-1%2Frecon%2FLists%2FMasterRequest1%2FAllItems.aspx:696

    SPEasyForms version: 2018.03
    Type of installation: I tried both .wsp and the file copy methods.
    Platform: SharePoint 2013 on-prem installed on development vm.

    I’ve tried re-installing, installing debug mode and attempting to delay the exeution until _spPageContextInfo is defined.
    I created a new site collection, verified that my master pages are un-changed, and the forms used are original default forms.

    Please advise.

    #1968

    Joe McShea
    Keymaster

    Hello,

    Sorry to take so long to respond. I didn’t see this right away, and then I was sick as a dog for a while. Anyway, I don’t have much in the way of ‘this is how you get around this kind of problem type’ advice for this one, because I’ve never seen it before and it appears to be a very serious problem. And it’s a pretty fundamental problem, as in _spPageContextInfo is loaded on every SharePoint page, by OOB SharePoint JavaScript, so it not being defined by the time my scripts are loaded as user custom actions should never happen.

    There are some differences between my page and other SharePoint pages though. SharePoint pages are generally ASPX pages with some code behind, that use server side controls to load the initial JavaScript files that initialize _spPageContextInfo. My page is just HTML, so I had to manually put in script tags to load enough of the JavaScript to get _spPageContextInfo initialized.

    So it seems like the most likely issue is that one or more of the OOB SharePoint JavaScript files that I’m loading with script tags isn’t getting loaded for some reason. The most likely cause for that would be that I’m getting a ‘404 Not Found’ response, or a ‘403 Forbidden’ response, or some other HTTP error code response on one of more of those scripts.

    Try opening the developer tools, go to the network tab, make sure it’s recording, and refresh the page. Then look for anything that looks like an error and let me know what you see.

    I don’t believe it’s any kind of general problem with SharePoint 2013 either. I have a SharePoint 2013 Foundation developer VM that I check each release on, and it worked fine with 2018.03. I’ll check it again just to be sure.

    Joe

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Scroll to top