When Adding Category: Uncaught TypeError: post.js:462
-
Hi,
I am currently developing on a WordPress install locally and I noticed that when I try and add a taxonomy (hierarchical, i.e. category like only, it works fine with tags) the ajax effect when you add one and it appears in the list above has broken. If you update the post and refresh the page, the new category appears in the list. I am using a few plugins – listed below – but I disabled all plugins and switched themes to twentyfifteen and the error still remains. I have tried and reproduced the error in Chrome, Firefox, IE11 and Opera.
I turned on script debugging and this is where the error is located:
Uncaught TypeError: Cannot read property ‘responses’ of undefined post.js:462
$.each.catAddAfter @ post.js:462
wpList.ajaxAdd.s.complete @ wp-lists.js:140
m.Callbacks.j @ jquery.js:2
m.Callbacks.k.fireWith @ jquery.js:2
x @ jquery.js:4
m.ajaxTransport.send.b @ jquery.js:4The function referred to is post.js:462 is this:
catAddAfter = function( r, s ) { var sup, drop = $('#new'+taxonomy+'_parent'); $( '#' + taxonomy + '-add-submit' ).prop( 'disabled', false ); if ( 'undefined' != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent) ) { drop.before(sup); drop.remove(); } };
and it’s the
if ( 'undefined'
line that is flagged in the console.I’m unsure what could be causing the error as all plugins were disabled and the default theme was turned back on. I even downloaded a new wordpress zip file and replaced wp-admin and wp-includes, but it still remains.
Any help trying to fix the issue would be most appreciated.
These are the plugins I have installed (but not active any more):
Admin Color Schemer Advanced Custom Fields Advanced Custom Fields: Repeater Field Advanced Custom Fields Pro BackupBuddy Bulk Delete Custom Post Type UI EWWW Image Optimizer Gravity Forms iThemes Security iThemes Sync New RoyalSlider Nginx Helper W3 Total Cache WordPress SEO WP Maintenance Mode WP Migrate DB Pro WP Migrate DB Pro Media Files
Thanks
- The topic ‘When Adding Category: Uncaught TypeError: post.js:462’ is closed to new replies.