Uncaught Error: Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0 at b

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Johannes davidian

johannes davidian

07/05/2017 13:54:16
Quote Anchor link
Hallo,

Ik he geprobeerd om bootstrap te installeren op Wordpress
ik heb deze code toegevoegd in function.php:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
function garage_stylesheets() {  
 
  
 wp_register_style( 'style.css',  get_template_directory_uri() . '/style.css', array(), null, 'all' );    
    wp_enqueue_style( 'style.css' );

wp_register_style( 'bootstrap.min.css',  get_template_directory_uri() . '/bootstrap.min.css', array(), null, 'all' );    
    wp_enqueue_style( 'bootstrap.min.css' );
}
add_action( 'wp_enqueue_scripts', 'garage_stylesheets' );


plus deze code in function.php:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function garage_scripts() {
wp_enqueue_script( 'garage-jquery.min.js', get_template_directory_uri() . '/js/jquery.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-tether.min.js', get_template_directory_uri() . '/js/tether.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-bootstrap.min.js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-scripts.min.js', get_template_directory_uri() . '/js/scripts.min.js', array(), '20151215', true );

    
    wp_enqueue_script( 'garage-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );

    wp_enqueue_script( 'garage-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
        wp_enqueue_script( 'comment-reply' );
    }
}
add_action( 'wp_enqueue_scripts', 'garage_scripts' );


plus deze scripts in footer.php:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.min.js"></script>
</body>
</html>


nu als ik ga naar mij website om te testen of alles is OK .

ik open inspect elements op mij website en ik zie deze fout meldingen:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
Uncaught Error: Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0
    at bootstrap.min.js:6
    at bootstrap.min.js:6
jquery.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
tether.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
scripts.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
scripts.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
webdesignleren.net/:1 Refused to execute script from 'http://blog.zx2c4.com/api/get_recent_posts/?include=url,title,date,comment__format=c&callback=jQuery1900584878062520682_1494157034903&_=1494157034904' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
/srv/www/cgi-bin/git.cgi Failed to load resource: the server responded with a status of 404 (Not Found)
/reparatie-ondehoud/cgi-bin/projects.cgi Failed to load resource: the server responded with a status of 404 (Not Found)


mij url is :http://webdesignleren.net/

wat ik moet doen precies om deze fout te corrigeren?

dank u wel
johannes
 
PHP hulp

PHP hulp

27/04/2024 06:37:36
 
- Ariën  -
Beheerder

- Ariën -

07/05/2017 14:14:43
Quote Anchor link
Zou je de titel kunnen aanpassen die je vraag/probleemstelling aanduidt? Een lange error melding helpt niet echt hierbij, en kan je beter in de het bericht vermelden.

Verder is de error vrij duidelijk dat je een oude jQuery gebruikt. Dus... upgraden die boel. De rest van die 404's betekent dat die scripts niet gevonden zijn.
Gewijzigd op 07/05/2017 14:16:29 door - Ariën -
 
Johannes davidian

johannes davidian

07/05/2017 14:47:27
Quote Anchor link
dank u wel ,
ik heb het probleem opgelost als volgende manier:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Garage
 */


?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">

<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/script.js/2.5.8/script.min.js"></script>
<?php wp_head(); ?>
</head>


hartelijke bedankt
johannes
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.