none
share point 2019 while edit the page, i got the below console error and struck the page if edit any web part in the page RRS feed

  • Question

  • I am deploying .wsp's from SharePoint 2013 to SP2019 and before i build the solution in VS 2019.

    After deploying the wsps, i am able to see the everything is fine in sp2019. but While edit the page, i got the below console errors.

    Let me know what i will do to clear these errors in Sp2019.

    No Luck after adding the below code in web.config. pls help is there any pre requisites to work with SP2019?

    <httpProtocol>
            <customHeaders>
                <add name="X-XSS-Protection" value="1; mode=block" /> // tried with value="0"
    </customHeaders> </httpProtocol>

    Console error:

    The XSS Auditor refused to execute a script in 'https://servername/abc.aspx' because its source code was found within the request. The auditor was enabled as the server did not send an 'X-XSS-Protection' header.

    Uncaught ReferenceError: _spBodyOnLoadFunctionNames is not defined
        at iis.ooc.aspmenu.min.js:1
    (anonymous) @ iis.ooc.aspmenu.min.js:1

    Uncaught ReferenceError: ExecuteOrDelayUntilBodyLoaded is not defined
        at abc.aspx:2643


    Wednesday, August 7, 2019 8:59 AM

All replies

  • Hi,

    In the Web Part deployed, please check if the necessary SharePoint library is loaded in the page using Developer Tool:

    If not loaded in the page, please try to add the following JavaScript Refrence before using _spBodyOnLoadFunctionNames and ExecuteOrDelayUntilBodyLoaded :

        <script type="text/javascript" src="/_layouts/15/init.js"></script>
        <script  type="text/javascript" src="/_layouts/15/sp.core.js"></script>
        <script  type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
        <script  type="text/javascript" src="/_layouts/15/sp.js"></script>

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, August 8, 2019 8:07 AM