0

I believe they changed the ASPX pages to be created with Publishing because now all of a sudden when I try and link to my html page through a Sharepoint ASPX page, it errors out saying "SP.Publishing.Resource" is undefined and then stop running any more code, leaving my page just sitting there dead.

I tried loading the sharepoint references directly into my HTML page and it works up until the point I need to get _spPageContextInfo and this is always undefined, as is the method to .get_currentUser(web) using SP.ClientConext(there are like 3 lines of code there, I don't have them off hand right now). The code works properly when it errors out loading in an ASPX page but returns undefined when loading in an HTML page even when its stored in SiteAssets on the Sharepoint site.

I have <SharePoint:SharePointForm runat="server"></SharePoint:SharePointForm> on my index.html page but this doesn't seem to do any good.

I need to figure out a way to get one of these methods to work or else I can no longer develop anything in Sharepoint. Please help with this, it is very urgent.

I have several ASPX pages that work perfectly fine in Sharepoint simply by linking my HTML page in a content editor and must have been before they changed how the ASPX pages are generated, but I cannot copy these, nor can I upload an ASPX document to the SitePages directory...they seem to be really locking it down, but I pride myself in figuring out workarounds, as I have had to do it so many times here. I have to get this working one way or another, I would prefer to use the ASPX method as everything was working fine this way, but if I have to find another way, I guess I have no choice.

  • You won't be able to add .NET tags in an HTML document. If they've blocked you from creating .aspx pages, you might be SOL. – jpollar Jun 18 '18 at 16:23
  • @jpollar I ended up resolving this somehow by changing the HTML extension of the page to an ASPX extension. For some reason that ended up working, I am not sure why. It's crazy because it is only happening on one site, not the others...but at least now I know how to fix the issue if it starts popping up on other sites when I create new pages... – MattE Jun 18 '18 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.