Uncaught TypeError: Cannot read property 'wpq' of null at NewOrEditV4Core (core.debug.js?rev=EW80nTQ9XTlOZU%2FEGCD2cg%3D%3DTAG0:4374) at _NewItem2 (core.debug.js?rev=EW80nTQ9XTlOZU%2FEGCD2cg%3D%3DTAG0:4400) at _corefn (init.debug.js?rev=sg%2FXmZzKNRbaX1nGy60onQ%3D%3DTAG0:10956) at EnsureScript (init.debug.js?rev=sg%2FXmZzKNRbaX1nGy60onQ%3D%3DTAG0:7993) at CoreInvoke (init.debug.js?rev=sg%2FXmZzKNRbaX1nGy60onQ%3D%3DTAG0:10959) at NewItem2 (init.debug.js?rev=sg%2FXmZzKNRbaX1nGy60onQ%3D%3DTAG0:12078) at btnUploadContent (My Cases.aspx:621) at HTMLButtonElement. (My Cases.aspx:605) at HTMLButtonElement.dispatch (jquery-3.3.1.js:5183) at HTMLButtonElement.elemData.handle (jquery-3.3.1.js:4991)

There are six web parts on the ASPX page:

  1. Promoted links app part.
  2. Submission Library custom web part.
  3. Editing library custom web part.
  4. Gold library custom web part.
  5. Beta library custom web part.
  6. Retired content library web part.

On submission library custom web part there is image "Upload Content" button. When I had not added promoted link list app part on the page my button is working fine. But when I add Promoted links list app part I get an above error.

I used:

  • jquery-3.3.1.js
  • jquery.dataTables.min.js
  • jquery.SPServices.min.js
  • dataTables.min.css

My Code is in .ascx file:

<script type="text/javascript">
    $(document).ready(function () {
        var libraryGuid = "";
        var buttonUploadContentUrl = '<%= System.Configuration.ConfigurationManager.AppSettings["UploadContentButtonIcon"].ToString() %>';
         var buttonUploadContentToolTip = '<%= System.Configuration.ConfigurationManager.AppSettings["UploadContentTooltip"].ToString() %>';
            "order": [[3, "desc"]],
            dom: 'l<"toolbar">frtip',
            initComplete: function () {

                $("div.toolbar").html('<button type="button" id="btnUploadContent" alt="Upload the content" title="'+ buttonUploadContentToolTip +'">Upload Content</button>');
            "language": {
                "emptyTable": "No data available"
        $("#btnUploadContent").click(function() {
    function GetListGuid() {
            operation: "GetList",
            listName: "Submission Library",
            async: false,
            completefunc: function (xData, Status) {
                libraryGuid = $(xData.responseXML).find("List").attr("ID");
        return libraryGuid;
    function btnUploadContent(event) {
        var uploadUrl = '<%= System.Configuration.ConfigurationManager.AppSettings["SLUploadDocumentURLPath"].ToString() %>';
        NewItem2(event,uploadUrl + " " + libraryGuid);


Please help me. Thank you.

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.