Support Forum

Bootstrap error

31 Answers

New Answer

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I wanted to declare the same function as in the parent functions.php to change what you said, but it crashes.

The parent looks like this:

function wf_register_scripts() {
…
wp_enqueue_script(‘bootstap’, get_template_directory_uri().’/assets/js/bootstrap.js’, ‘jquery’, ‘1.0’, TRUE);
…
}

add_action( ‘wp_enqueue_scripts’, ‘wf_register_scripts’ );

Maybe I need to remove the action and replace it with another one? 

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Looks like I made it work doing this:

function remove_my_parent_theme_function() {
remove_action(‘wp_enqueue_scripts’, ‘wf_register_scripts’);
}
add_action(‘wp_loaded’, ‘remove_my_parent_theme_function’);

function my_wf_register_scripts() {
…
wp_enqueue_script(‘bootstrap’, get_template_directory_uri().’/assets/js/bootstrap.js’, ‘jquery’, ‘1.0’, FALSE);
…
}
add_action(‘wp_enqueue_scripts’, ‘my_wf_register_scripts’);

How does it look?

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t understand why you are going to all that trouble. I was just suggesting you change the original temporarily to see if that resolved the issue. If it does then the decision can be made on how to tackle it…

YS Yellow Swordfish
Yellow Swordfish
Member

So you still get the same console script errors with that change? Or are they different?

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

It’s the same error, everytime I move the mouse anywhere on the site

YS Yellow Swordfish
Yellow Swordfish
Member

Move the mouse? Really? You have not described that before. So how does this manifest itself? What are the actual visual signs?

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

The forum works fine apparently, the only thing missing is the window title (it shows the url)

YS Yellow Swordfish
Yellow Swordfish
Member

That looks like it might be a tooltip conflict to me. Try this – In your SP theme templates folder (and hopefully you are using a child theme) find the spFunctions.php file. Change the use of the tooltips to false as described in the comment. See if that stops the script conflicts.

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I’ll try it later (I’m at work now)… and I’ll create a child theme 

YS Yellow Swordfish
Yellow Swordfish
Member

OK. But again – you can test it just by making the change in the full theme. If it stops the script conflict errors then you can go for the full fix.

I don’t see anything to suggest that this might be the cause but if the WP theme does institute its own tooltip routines we would not be able to tell that and it may be the source of the conflict.

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Looks like it’s working after disabling the tooltips

https://www.subnoise.es/foro/

YS Yellow Swordfish
Yellow Swordfish
Member

So – loading their own tooltips lib which is fighting with the one we supply. Again – the one we supply is the WordPress standard and supplied library. But keeping it turned off will, of course, solve the issue.