Title: Javascript Error
Last modified: July 26, 2023

---

# Javascript Error

 *  Resolved [slackarse](https://wordpress.org/support/users/slackarse/)
 * (@slackarse)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-225/)
 * Hi,
 * The latest update (_PublishPress Future Version 3.0.5_) causes a JavaScript error
   on pages unrelated to scheduling posts. At the moment, it doesn’t appear to affect
   anything else on the pages.
 *     ```wp-block-code
       Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
       at toggleCategorySelection ((index):142:37)
       at init ((index):152:17)
       at HTMLDocument. ((index):137:17)
       at e (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:26990)
       at t (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:27292)
       ```
   
 *     ```wp-block-code
       function toggleCategorySelection(element) {
         if ($(element).val().indexOf('category') !== -1) {
           $('#expired-category-selection').show();
           $('#expired-category-wrapper').show();
         } else {
           $('#expired-category-selection').hide();
           $('#expired-category-wrapper').hide();
         }
       ```
   

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

 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-225/#post-16924531)
 * Hi [@slackarse](https://wordpress.org/support/users/slackarse/)
 * Thanks for this report.
 * I’ve created a GitHub issue for this so our developer can fix this in the next
   release: [https://github.com/publishpress/PublishPress-Future/issues/517](https://github.com/publishpress/PublishPress-Future/issues/517)
 * Thanks,
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-225/#post-16928996)
 * This has been fixed in the 3.0.6 version. Please open a new thread if the issue
   persists.

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

The topic ‘Javascript Error’ is closed to new replies.

 * ![](https://ps.w.org/post-expirator/assets/icon-256x256.png?rev=3118683)
 * [Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories](https://wordpress.org/plugins/post-expirator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-expirator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-expirator/)
 * [Active Topics](https://wordpress.org/support/plugin/post-expirator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-expirator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-expirator/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-225/#post-16928996)
 * Status: resolved