{"id":447,"date":"2022-08-30T15:01:30","date_gmt":"2022-08-30T15:01:30","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/uncaught-typeerror-cannot-read-property-id-of-undefined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:01:30","modified_gmt":"2022-08-30T15:01:30","slug":"uncaught-typeerror-cannot-read-property-id-of-undefined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/uncaught-typeerror-cannot-read-property-id-of-undefined-collection-of-common-programming-errors\/","title":{"rendered":"Uncaught TypeError: Cannot read property &#39;id&#39; of undefined-Collection of common programming errors"},"content":{"rendered":"<p>I was working on a site in wordpress. I don&#8217;t know why, suddenly its giving the error <code>Uncaught TypeError: Cannot read property 'id' of undefined<\/code>. I tried to do almost every thing. Removed the Plugins, Removed the widgest. But it still complaining for it. Due to it my script is not working.<\/p>\n<p>The error is on line 63 of page, which contains<\/p>\n<pre><code>\/*  0) { timeOutFn = setTimeout(makeSlider, thisTimeOut); } else { console.log(\"Poof..\"); } }; var makeSlider = function() {current = (current != null) ? current : items[(items.length-1)]; var currNo = jQuery.inArray(current, items) + 1; currNo = (currNo == items.length) ? 0 : (currNo - 1); var newMargin = $(element).width() * currNo; if(faderStat == true) { if(!mOver) { $(items[currNo]).fadeIn((timeOut\/6), function() { if($(itemsSpan[currNo]).css('bottom') == 0) { $(itemsSpan[currNo]).slideUp((timeOut\/6), function() { faderStat = false; current = items[currNo]; if(!mOver) { fadeElement(false); } }); } else { $(itemsSpan[currNo]).slideDown((timeOut\/6), function() { faderStat = false; current = items[currNo]; if(!mOver) { fadeElement(false); } }); } }); } } else { if(!mOver) { if($(itemsSpan[currNo]).css('bottom') == 0) { $(itemsSpan[currNo]).slideDown((timeOut\/6), function() { $(items[currNo]).fadeOut((timeOut\/6), function() { faderStat = true; current = items[(currNo+1)]; if(!mOver) { fadeElement(false); } }); }); } else { $(itemsSpan[currNo]).slideUp((timeOut\/6), function() { $(items[currNo]).fadeOut((timeOut\/6), function() { faderStat = true; current = items[(currNo+1)]; if(!mOver) { fadeElement(false); } }); }); } } } }        \n    makeSlider();};})(jQuery); jQuery(document).ready(function() { jQuery('#slider').s3Slider({ timeOut: 3000 }); });   \/* ]]&gt; *\/\n<\/code><\/pre>\n<p>I am using Jquery mega menu widget plugin.<\/p>\n<p>I need to fix it urgently. Please help me in it.<\/p>\n<ol>\n<li>\n<p>After testing and locating from where it comes, Ultimate Custom Type Manager plugin was generating some scripts, the script file is class-gallery.php so which is generating a script for #slider element which does not exists on the page. Hope some one will fix it soon.<\/p>\n<p>Replaced line <strong>82<\/strong> of the file <strong>class-gallery.php<\/strong> with this code<\/p>\n<pre><code>$r.=\"jQuery(document).ready(function() { if(jQuery('#slider').length &gt; 0) { jQuery('#slider').s3Slider({ timeOut: 3000 }); } });\";\n<\/code><\/pre>\n<p>Fixed the problem.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 19:43:08. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I was working on a site in wordpress. I don&#8217;t know why, suddenly its giving the error Uncaught TypeError: Cannot read property &#8216;id&#8217; of undefined. I tried to do almost every thing. Removed the Plugins, Removed the widgest. But it still complaining for it. Due to it my script is not working. The error is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-447","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=447"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/447\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}