Title: Zedley's Replies | WordPress.org

---

# Zedley

  [  ](https://wordpress.org/support/users/zedley/)

 *   [Profile](https://wordpress.org/support/users/zedley/)
 *   [Topics Started](https://wordpress.org/support/users/zedley/topics/)
 *   [Replies Created](https://wordpress.org/support/users/zedley/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/zedley/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/zedley/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/zedley/engagements/)
 *   [Favorites](https://wordpress.org/support/users/zedley/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Cannot view all categories and tags in selection options for automatic content](https://wordpress.org/support/topic/cannot-view-all-categories-and-tags-in-selection-options-for-automatic-content/)
 *  Thread Starter [Zedley](https://wordpress.org/support/users/zedley/)
 * (@zedley)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-view-all-categories-and-tags-in-selection-options-for-automatic-content/#post-8292623)
 * Hey [@chouch7](https://wordpress.org/support/users/chouch7/), if you hit me up
   [dan.herman@gmail.com](https://wordpress.org/support/users/zedley/replies/dan.herman@gmail.com?output_format=md)
   I can try to help you get the patch going to at least get it working.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Cannot view all categories and tags in selection options for automatic content](https://wordpress.org/support/topic/cannot-view-all-categories-and-tags-in-selection-options-for-automatic-content/)
 *  Thread Starter [Zedley](https://wordpress.org/support/users/zedley/)
 * (@zedley)
 * [10 years ago](https://wordpress.org/support/topic/cannot-view-all-categories-and-tags-in-selection-options-for-automatic-content/#post-7653814)
 * More than a dozen, and like I said the bigger problem is my custom taxonomy.
 * The problem is definitely in how Select2 is getting the information passed to
   it — in js/fields/select2-terms.js, line 33, information.results is an array 
   the first time through, and always an object after that. I’m not 100% sure why
   that is (your controllers/ajax/campaigns.php is returning arrays), but I suspect
   it has something to do with the json serialization, which is a problem I’ve encountered
   before when trying to deal with Ajaxing stuff out of WordPress.
 * While I don’t have time to investigate the root problem of why it’s turning up
   as an object instead of an array, I did whip up a simple patch that at least 
   makes it work (maps the problematic object to an array) if you insert this into
   select2-terms.js at line 33:
 *     ```
       if (!jQuery.isArray(information.results)) {
       						information.results = jQuery.map(information.results,function(value,idx) { return [value] } )
       					}
       ```
   

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