Title: Uncaught TypeError: Illegal invocation
Last modified: May 5, 2023

---

# Uncaught TypeError: Illegal invocation

 *  Resolved [fdtw](https://wordpress.org/support/users/fdtw/)
 * (@fdtw)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/)
 * Hi all,
 * Working with your plugin and another hotel management plugin, I encountered this
   error that makes the management system unusable. Disabling Jeg Kit everything
   works fine… How can it be fixed so that it doesn’t load resources on external
   administration side pages?
 *     ```wp-block-code
       Uncaught TypeError: Illegal invocation
       at Object.findOne (bootstrap.bundle.min.js?ver=5.2.2:6:9928)
       at Ni._showElement (bootstrap.bundle.min.js?ver=5.2.2:6:52478)
       at bootstrap.bundle.min.js?ver=5.2.2:6:51521
       at m (bootstrap.bundle.min.js?ver=5.2.2:6:2010)
       at bootstrap.bundle.min.js?ver=5.2.2:6:48911
       at m (bootstrap.bundle.min.js?ver=5.2.2:6:2010)
       at HTMLDivElement.a (bootstrap.bundle.min.js?ver=5.2.2:6:2383)
       at s (bootstrap.bundle.min.js?ver=5.2.2:6:636)
       at bootstrap.bundle.min.js?ver=5.2.2:6:2434
       ```
   

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

 *  Plugin Author [Fauzan Jegstudio](https://wordpress.org/support/users/fauzanjegstudio/)
 * (@fauzanjegstudio)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16718362)
 * Hello [@fdtw](https://wordpress.org/support/users/fdtw/),
 * We apologize for the delay in our response and for any inconvenience caused. 
   Firstly, could you please let us know which plugin you are using? Additionally,
   on which page is this issue occurring?
 * Previously, we had a filter hook that could disable the bootstrap from our plugin.
   You can use the `filter add_filter( 'jkit_remove_form_control_conditions', 'callback');`
   to modify the conditions. For more detailed instructions, please refer to the
   file `../wp-content/plugins/jeg-elementor-kit/helper.php:542`, `jkit_remove_form_control()`
   functions.
 * Usually, this issue arises due to version discrepancies. It may be helpful if
   you can confirm the version of Bootstrap that the plugin is using.
 * We hope this information assists you.
 * Thank You
 *  Thread Starter [fdtw](https://wordpress.org/support/users/fdtw/)
 * (@fdtw)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16718737)
 * Hi, thanks for the reply.
   The plugin name is VikBooking and the error has occurred
   in the plugin backend when I try to open popup menu.
 * I put in `../wp-content/plugins/jeg-elementor-kit/helper.php:542`, `jkit_remove_form_control()`
   function
 *     ```wp-block-code
       add_filter( 'jkit_remove_form_control_conditions', 'callback' ); 
       ```
   
 * but it returns the error
 *     ```wp-block-code
       Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'callback' not found or invalid function name in /home/customer/www/sitename/public_html/wp-includes/class-wp-hook .php online 308
       Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/sitename/public_html/wp-includes/class-wp-hook.php:308) in /home/customer/www/sitename/ public_html/wp-admin/admin-header.php online 9
       ```
   
 * did I do something wrong?
 * Thank You
 *  Plugin Author [Fauzan Jegstudio](https://wordpress.org/support/users/fauzanjegstudio/)
 * (@fauzanjegstudio)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16721282)
 * Hello [@fdtw](https://wordpress.org/support/users/fdtw/),
 * We apologize for any inconvenience caused. You can revert the changes you made
   earlier and instead, please add the code snippet from the link below to your 
   functions.php file to address this issue.
 * [Pastebin](https://pastebin.com/ZbbzMC6C): [https://pastebin.com/ZbbzMC6C](https://pastebin.com/ZbbzMC6C)
 * We recommend that you back up your data before adding the code.
 * Thank You
 *  Thread Starter [fdtw](https://wordpress.org/support/users/fdtw/)
 * (@fdtw)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16722854)
 * Hi,
 * I followed your instructions but no change happened. I have added the code in
   functions.php but the same problem is present
 * ![](https://i0.wp.com/i.postimg.cc/ZYBFLybj/issue.gif?ssl=1)
 * ![](https://i0.wp.com/i.postimg.cc/VLQ5PyzX/Xnip2023-05-09-13-43-42.png?ssl=1)
 * Thank You
 *  Plugin Author [Fauzan Jegstudio](https://wordpress.org/support/users/fauzanjegstudio/)
 * (@fauzanjegstudio)
 * [3 years ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16728586)
 * Hello [@fdtw](https://wordpress.org/support/users/fdtw/),
 * We apologize for the previous mistake. It seems that we provided incorrect conditions
   in the code. We have now updated the code, and we hope you can add it again.
 * Thank You
 *  Thread Starter [fdtw](https://wordpress.org/support/users/fdtw/)
 * (@fdtw)
 * [3 years ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16730058)
 * Thanks, everything works now
 *  Plugin Author [Fauzan Jegstudio](https://wordpress.org/support/users/fauzanjegstudio/)
 * (@fauzanjegstudio)
 * [3 years ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16731231)
 * You’re welcome [@fdtw](https://wordpress.org/support/users/fdtw/)!
 * We’re glad to have been of assistance! If you have any other questions or issues
   in the future, feel free to create a new topic. We’re here to help.
 * Thank you and have a great day!

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

The topic ‘Uncaught TypeError: Illegal invocation’ is closed to new replies.

 * ![](https://ps.w.org/jeg-elementor-kit/assets/icon.svg?rev=3378738)
 * [Jeg Kit for Elementor – Powerful Addons for Elementor, Widgets & Templates for WordPress](https://wordpress.org/plugins/jeg-elementor-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jeg-elementor-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jeg-elementor-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/jeg-elementor-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jeg-elementor-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jeg-elementor-kit/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Fauzan Jegstudio](https://wordpress.org/support/users/fauzanjegstudio/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/uncaught-typeerror-illegal-invocation-2/#post-16731231)
 * Status: resolved