'Wordpress JS error when trying to add a new category to the product admin page
To summarise the issue, in the Wordpress back end go to products, add new. When i click "+ Add new category", fill in the box and click the "add new category" button nothing happens.
The new category should be added to the list of categories straight away. When i reload the page the category is then added to the list of categories. This is an issue as we have lots of products to add manually and reloading the page slows down this process.
I have tried the following to fix:
- remove all inactive plugins
- disable all plugins (apart from woocommerce needed to test)
- changing the theme
- updating wordpress
- removing all custom JS
- removing all functions from functions.php file
- removing all categories
Any advice on this would be much appreciated, if there is any more information required please ask.
Thanks
error message for chrome:
Uncaught TypeError: Cannot read property 'responses' of undefined at Object.c [as addAfter] (post.min.js?ver=5.1:1) at Object.j.is.d.element.wpAjax.validateForm.d.data.match.d.complete (wp-lists.min.js?ver=5.1:1) at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,backbone,wp-util,&load[]=wp-backbone,media-models,moxiejs,plupload&ver=5.1:2) at Object.fireWith (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,backbone,wp-util,&load[]=wp-backbone,media-models,moxiejs,plupload&ver=5.1:2) at y (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,backbone,wp-util,&load[]=wp-backbone,media-models,moxiejs,plupload&ver=5.1:4) at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,backbone,wp-util,&load[]=wp-backbone,media-models,moxiejs,plupload&ver=5.1:4)
a different error message for firefox: load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-position,jquery&load[]=-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,editor-expand,thickbox,shortcode,wp-plupload,wp-mediaeleme&load[]=nt,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,svg-painter,wp-auth-check,imageslo&load[]=aded,masonry,jquery-masonry,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,wp-api,wp-annotations,m&load[]=edia-upload,jquery-ui-accordion&ver=5.0.4:50 Uncaught TypeError: Cannot read property 'responses' of undefined at Object.c [as addAfter] (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-position,jquery&load[]=-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,editor-expand,thickbox,shortcode,wp-plupload,wp-mediaeleme&load[]=nt,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,svg-painter,wp-auth-check,imageslo&load[]=aded,masonry,jquery-masonry,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,wp-api,wp-annotations,m&load[]=edia-upload,jquery-ui-accordion&ver=5.0.4:50) at Object.j.is.d.element.wpAjax.validateForm.d.data.match.d.complete (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-position,jquery&load[]=-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,editor-expand,thickbox,shortcode,wp-plupload,wp-mediaeleme&load[]=nt,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,svg-painter,wp-auth-check,imageslo&load[]=aded,masonry,jquery-masonry,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,wp-api,wp-annotations,m&load[]=edia-upload,jquery-ui-accordion&ver=5.0.4:12) at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2) at Object.fireWith (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2) at y (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4) at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4)
Solution 1:[1]
This issue has been resolved.
The issue was being caused by a cache plugin called breeze.
To rectify, breeze needs to be disabled or removed and then purge varnish cache from your hosting provider.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | James Dykes |
