Title: JavaScript error in v2.6.1
Last modified: September 3, 2021

---

# JavaScript error in v2.6.1

 *  Resolved [James Nylen](https://wordpress.org/support/users/jnylen0/)
 * (@jnylen0)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-in-v2-6-1/)
 * Hi,
 * Version 2.6.1 of this plugin is causing a JavaScript error in core when using
   the classic editor.
 * As part of the series metabox, this plugin creates a div with class `categorydiv`
   which is a special class used by core: [https://github.com/WordPress/wordpress-develop/blob/b83b01e1b01429dc4a6da49ec23e1f7dfc4ae446/src/js/_enqueues/admin/post.js#L569-L571](https://github.com/WordPress/wordpress-develop/blob/b83b01e1b01429dc4a6da49ec23e1f7dfc4ae446/src/js/_enqueues/admin/post.js#L569-L571)
 * The div is created by the plugin here: [https://plugins.trac.wordpress.org/browser/organize-series/tags/2.6.1/orgSeries-admin.php#L288](https://plugins.trac.wordpress.org/browser/organize-series/tags/2.6.1/orgSeries-admin.php#L288)
 * Core’s JavaScript in `post.js` linked above does not expect this `categorydiv`
   class to be present anywhere except for in core’s category selector metabox. 
   This plugin creates a div that breaks this core JavaScript code with an error“
   this_id is undefined”. This causes a cascading failure that stops much of the
   JavaScript execution on the editor page.
 * Removing the `categorydiv` class from this div seems to fix this error. I also
   see that the plugin code in `trunk` is different from what was released in 2.6.1
   though, so I’m not sure if you had another fix in mind for this issue that didn’t
   make it into the 2.6.1 release.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-in-v2-6-1/#post-14837200)
 * Thanks for the detailed report [@jnylen0](https://wordpress.org/support/users/jnylen0/)
 * We’ll fix in 2.6.2
    [https://github.com/publishpress/publishpress-series/issues/213](https://github.com/publishpress/publishpress-series/issues/213)
 *  Thread Starter [James Nylen](https://wordpress.org/support/users/jnylen0/)
 * (@jnylen0)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-in-v2-6-1/#post-14837383)
 * You’re welcome.
 * In the meantime, users can add the following code to functions.php or a mu-plugin
   to fix the issue:
 *     ```
       // Fix for https://wordpress.org/support/topic/javascript-error-in-v2-6-1/
   
       add_action('add_meta_boxes', function() {
         global $wp_meta_boxes;
         $wp_meta_boxes['post']['side']['default']['seriesdiv']['callback'] =
           'series_edit_meta_box_fixed';
       }, 10);
   
       function series_edit_meta_box_fixed() {
         ob_start();
         series_edit_meta_box();
         $html = ob_get_clean();
         echo str_replace(
           '<div class="series-metadiv categorydiv">',
           '<div class="series-metadiv">',
           $html
         );
       }
       ```
   
    -  This reply was modified 4 years, 9 months ago by [James Nylen](https://wordpress.org/support/users/jnylen0/).
    -  This reply was modified 4 years, 9 months ago by [James Nylen](https://wordpress.org/support/users/jnylen0/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JavaScript error in v2.6.1’ is closed to new replies.

 * ![](https://ps.w.org/organize-series/assets/icon-256x256.png?rev=3386599)
 * [Issues and Series for Newspapers, Magazines, Publishers, Writers](https://wordpress.org/plugins/organize-series/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/organize-series/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/organize-series/)
 * [Active Topics](https://wordpress.org/support/plugin/organize-series/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/organize-series/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/organize-series/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [James Nylen](https://wordpress.org/support/users/jnylen0/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-in-v2-6-1/#post-14837383)
 * Status: resolved