Title: JS error
Last modified: September 1, 2016

---

# JS error

 *  Resolved [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/js-error-45/)
 * There’s an Js error on post editor pages
 * `TypeError: undefined is not an object (evaluating 'Object.keys(langs)')`
 * in plugin-scripts.js:18
 * Thanks
    Thomas
 * [https://wordpress.org/plugins/wp-post-expires/](https://wordpress.org/plugins/wp-post-expires/)

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

 *  Plugin Author [X-NicON](https://wordpress.org/support/users/x-nicon/)
 * (@x-nicon)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/js-error-45/#post-7693979)
 * Please tell me what browser you use, what is your OS and language of WP
 *  Thread Starter [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/js-error-45/#post-7693983)
 * My OS is Mac OS X 10.11.6 and the language of WP is German.
 * I test it with Safari, Firefox and Chrome. The JS error is different (Safari 
   reports the message as in the original post; Firefox and Chrome telling me: Uncaught
   TypeError: Cannot convert undefined or null to object) I think it has something
   to do with the language-Parameter for the DateTimePicker.
 * Thanks for your helping
    Thomas
 *  [Andy Leppard](https://wordpress.org/support/users/andyleppard/)
 * (@andyleppard)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/js-error-45/#post-8230327)
 * I’m getting similar errors, and the script that adds the misc-pub-section to 
   the save box blocks the Yoast SEO misc-pub-sections from loading. My errors are:
 *     ```
       Uncaught TypeError: Cannot convert undefined or null to object
          (anonymous function) @ plugin-scripts.js?ver=4.6.1:18
          i @ jquery.js?ver=1.12.4:2
          fireWith @ jquery.js?ver=1.12.4:2
          ready @ jquery.js?ver=1.12.4:2
          K @ jquery.js?ver=1.12.4:2
       ```
   
 * Any help tracking this error down would be great. This plugin does exactly what
   I need with no bloat.
 *  [Andy Leppard](https://wordpress.org/support/users/andyleppard/)
 * (@andyleppard)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/js-error-45/#post-8230339)
 * I removed line 18 and the Yoast boxes now appear. Line 18:
    `language: langs[
   Object.keys(langs)[Object.keys(langs).length - 1]]`
    -  This reply was modified 9 years, 8 months ago by [Andy Leppard](https://wordpress.org/support/users/andyleppard/).
 *  [Jerrad](https://wordpress.org/support/users/jjgleim/)
 * (@jjgleim)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/js-error-45/#post-8377262)
 * I was in the same situation as Andy Leppard and removed line 18 which allowed
   Yoast SEO to appear in the Publish panel. I was also having trouble getting the“
   Edit” links for _Status_, _Visibility_, and _Published_ to work.
 * Now that Line 18 is gone, there’s an issue with the date picker. When I set the
   expiration, the calendar comes up and I can select a date (November 17, 2016),
   but this is what gets input in the box.
 * `20162016-11-17`
 * If I leave it and “Update” the post, after the edit screen reloads I see that
   the expiration time is the exact date and time when I updated the post which 
   causes it to become instantly expired. I can go and Edit the expiration date 
   and time and manually change the values to the date and time I really wanted,
   press Ok, and update and the values stay. So that’s good at least.
 * If I didn’t have multiple authors writing on my site, I would just give them 
   the work around, but I don’t want to do that because some are NOT tech savvy 
   and this will cause more work for the rest of my team. I hope you can find a 
   way to fix the issue. Thanks!

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

The topic ‘JS error’ is closed to new replies.

 * ![](https://ps.w.org/wp-post-expires/assets/icon-128x128.png?rev=1475897)
 * [WP Post Expires](https://wordpress.org/plugins/wp-post-expires/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-post-expires/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-post-expires/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-post-expires/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-post-expires/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Jerrad](https://wordpress.org/support/users/jjgleim/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/js-error-45/#post-8377262)
 * Status: resolved