the real path is:
wp-includes/js/jquery/…
but for the network sites (I guess there is a WP re-write rule) in place:
for the main site:
https://www.mydomain.tld/wp-includes/js/jquery/…
and for other network sites:
https://www.mydomain.tld/en/wp-includes/js/jquery/…
https://www.mydomain.tld/fr/wp-includes/js/jquery/…
All of the jquery links are working by default I can reach the same jquery file with /en, /fr .. or main site /
I do not use a subdomain based multisite, the permalinks are just set to:
en/
fr/
and
/
for the main site
-
This reply was modified 8 years, 8 months ago by
cluster666.
-
This reply was modified 8 years, 8 months ago by
cluster666.
and for other network sites:
https://www.mydomain.tld/en/wp-includes/js/jquery/…
https://www.mydomain.tld/fr/wp-includes/js/jquery/…
does that mean that path to jquery.js (which is not aggregated) and jquery-migrate.min.js (which is migrated, correct?) are the same? if so; spooky!
All of the jquery links are working by default I can reach the same jquery file with /en, /fr .. or main site /
that’s because you’ll indeed probably have a rewrite-rule in .htaccess or something similar, which AO cannot know about.
I have checked the link from sourcecode before AO was activated!
$langlink means “/en” “/fr” when change the languages
<script type='text/javascript' src='<?php echo network_site_url(); ?><?php echo $langlink; ?>wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
so what happens if you remove <?php echo $langlink; ?>?
frank
thanks Frank,
I have checked the functions.php again and found this:
// Dequeue jQuery Migrate script in WordPress.
function isa_remove_jquery_migrate( &$scripts) {
if(!is_admin()) {
$scripts->remove( 'jquery');
$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4' );
}
}
add_filter( 'wp_default_scripts', 'isa_remove_jquery_migrate' );
could this be the reason?
well, that certainly explains why jquery-migrate.min.js isn’t a problem; it’s removed by that code 🙂
so did you try removing the $langlink code?
Thanks Frank!
Great, the hardcoded way works without $langlink or subfolder specification, also with official package 😉
<script type='text/javascript' src='<?php echo network_site_url(); ?>wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
Do tyou think disabling of jquery-migrate.min.js is OK if everything else works?
Regards, Ralph
Great, the hardcoded way works without $langlink or subfolder specification
great news! 🙂
Do you think disabling of jquery-migrate.min.js is OK if everything else works?
well, disabling jquery-migrate.min.js might break stuff as its aim is to plug holes left by stuff being removed from jquery proper. so if you have older pluginsand or people using older browsers (not sure), then you might want to keep jquery-migrate after all 🙂