How to solve this Uncaught TypeError

  • 25 November 2021
  • 3 replies

Badge +1

 My website is completely black. If I try to open the Elementor editor, it only works in Safe Modus. If I go to the debugger, this is the error I get. Anyone any ideas how to fix it?

Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "my_scripts_method" not found or invalid function name in /customers/5/d/7/ trace:#0 /customers/5/d/7/ WP_Hook->apply_filters(NULL, Array)#1 /customers/5/d/7/ WP_Hook->do_action(Array)#2 /customers/5/d/7/ do_action('wp_enqueue_scri...')#3 /customers/5/d/7/ wp_enqueue_scripts('')#4 /customers/5/d/7/ WP_Hook->apply_filters(NULL, Array)#5 /customers/5/d/7/ WP_Hook->do_action(Array)#6 /customers/5/d/7/ do_action('wp_head')#7 /customers/5/d/7/ wp_head()#8 /customers/5/d/7/ require('/customers/5/d/...')#9 /customers/5/d/7/ ElementorPro\Modules\ThemeBuilder\Classes\Theme_Support->get_header(NULL)#10 /customers/5/d/7/ WP_Hook->apply_filters('', Array)#11 /customers/5/d/7/ WP_Hook->do_action(Array)#12 /customers/5/d/7/ do_action('get_header', NULL, Array)#13 /customers/5/d/7/ get_header()#14 /customers/5/d/7/ include('/customers/5/d/...')#15 /customers/5/d/7/ require_once('/customers/5/d/...')#16 /customers/5/d/7/ require('/customers/5/d/...')#17 {main}  thrown

Best answer by Anneleen Vaes 28 November 2021, 17:04

View original

3 replies

Userlevel 7
Badge +4

@Anneleen Vaes Have you found your answer yet? If so, please share it here so we can mark your answer as the best one and help others who may have a similar question, thanks :)

Badge +1

I just switched the theme, that was the big cause. But would have been better to just fix the error within that specific theme.

Userlevel 7
Badge +4

@Anneleen Vaes Not all themes will be able to work with Elementor or perhaps are not kept up to date as Elementor updates, so that could have been the cause. What theme were you using and what did you switch to?


If you have Elementor Pro, as I see you do then you can build everything with it (using theme builder) including the site parts that a theme normally provides (e.g. archive pages, single post, header, footer) and then use Elementor Hello theme which is a bare bones theme that is very lightweight and meant for Pro.


Anyway, glad you got it sorted out.