Title: advads_toggle is not defined
Last modified: August 30, 2016

---

# advads_toggle is not defined

 *  Resolved [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/)
 * When I try to add a new ad placement I get this error “advads_toggle is not defined”
 * I’m using version 1.6.4.1
 * [https://wordpress.org/plugins/advanced-ads/](https://wordpress.org/plugins/advanced-ads/)

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

 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301006)
 * Hi William,
 * thank you for your message.
    Did this work before for you? This is a JavaScript
   error, right?
 * I moved some functions, but on my environments, everything looks fine. Are you
   using a script that maybe caches or minifies javascript files in the dashboard?
 * Are there any other error messages? Maybe another plugin has a critival javascript
   issue that might interfere with Advanced Ads.
 * Thanks
    Thomas
 *  Thread Starter [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301046)
 * It was normal just before the two last updates, I really don’t know what’s happening,
   if I create just this function on the console I can work with the plugin
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301099)
 * Could you check if the following file is loaded in your dashboard (on the page
   with the error) and if it includes the advads_toggle function?
 * wp-content/plugins/advanced-ads/admin/assets/js/admin.js
 * Does the error message indicate where the function is called?
 * Thanks
    Thomas
 *  Thread Starter [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301133)
 * admin.js is not being loaded ( that’s where I got the function to create it manually)
   only admin-global is being loaded.
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301143)
 * Thanks!
 * I recently added a check for the script to load only on pages related to Advanced
   Ads. The placement page should be there though.
 * It seems like you are more advanced with code, so I hope this is not too much
   to ask:
 * Please go to admin/class-advanced-ads-admin.php line 190 and add `echo $screen-
   >id` after it. I would like to know what the output is here so that I know if
   I missed a page.
 * Thanks
    Thomas
 *  Thread Starter [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301144)
 * ger-banners_page_advanced-ads-placements
 *  Thread Starter [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301145)
 * by the way, mine is using the pt-br translation.
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301148)
 * That was it, thank you!
 * The plugin name was translated into Portuguese and that broke the check.
 * I am going to make the plugin name untranslatable in the next version.
 * Thsnks for your help!
    Thomas
 *  Thread Starter [William Rufino](https://wordpress.org/support/users/williamhrs/)
 * (@williamhrs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301149)
 * Yeah, I figured it when I “echoed” the value!
 * Thank you 🙂
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301230)
 * Just uploaded the newest version (1.6.5) with the fix.
 * Thanks
    Thomas

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

The topic ‘advads_toggle is not defined’ is closed to new replies.

 * ![](https://ps.w.org/advanced-ads/assets/icon-256x256.gif?rev=2773443)
 * [Advanced Ads – Ad Manager & AdSense](https://wordpress.org/plugins/advanced-ads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-ads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-ads/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-ads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-ads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-ads/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/advads_toggle-is-not-defined/#post-6301230)
 * Status: resolved