RequireJS components sometimes not loading The Next CEO of Stack OverflowMagento2 not reading my requirejs-config.jsMagento 2 RequireJs callback not calledRequirejs shim option not workingMagento 2 from Bitnami on Amazon Lightsail VPS servers won't upgrade and requires reindexing all the timeProblems moving magento2 from shared cpanel to dedicated Centos 6 LAMP serverrequirejs-config.js compiling with wrong codeRequireJs magento2 loading custom js plugin results in DOMException: Failed to execute 'querySelectorAll'RequireJS fails loading required javascript with cache disabled, but only sometimesrequirejs-config, requirejs errorsIScroll not defined when loading with RequireJS?
Is it possible to make a 9x9 table fit within the default margins?
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
MT "will strike" & LXX "will watch carefully" (Gen 3:15)?
Upgrading From a 9 Speed Sora Derailleur?
How to unfasten electrical subpanel attached with ramset
Airship steam engine room - problems and conflict
That's an odd coin - I wonder why
How to find if SQL server backup is encrypted with TDE without restoring the backup
Could a dragon use its wings to swim?
How dangerous is XSS
What difference does it make matching a word with/without a trailing whitespace?
Prodigo = pro + ago?
How to coordinate airplane tickets?
Is a distribution that is normal, but highly skewed, considered Gaussian?
Are British MPs missing the point, with these 'Indicative Votes'?
Early programmable calculators with RS-232
Direct Implications Between USA and UK in Event of No-Deal Brexit
The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11
Gauss' Posthumous Publications?
Man transported from Alternate World into ours by a Neutrino Detector
Can a PhD from a non-TU9 German university become a professor in a TU9 university?
Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?
Is this a new Fibonacci Identity?
What is the difference between 'contrib' and 'non-free' packages repositories?
RequireJS components sometimes not loading
The Next CEO of Stack OverflowMagento2 not reading my requirejs-config.jsMagento 2 RequireJs callback not calledRequirejs shim option not workingMagento 2 from Bitnami on Amazon Lightsail VPS servers won't upgrade and requires reindexing all the timeProblems moving magento2 from shared cpanel to dedicated Centos 6 LAMP serverrequirejs-config.js compiling with wrong codeRequireJs magento2 loading custom js plugin results in DOMException: Failed to execute 'querySelectorAll'RequireJS fails loading required javascript with cache disabled, but only sometimesrequirejs-config, requirejs errorsIScroll not defined when loading with RequireJS?
We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".
How would we go about troubleshooting and resolving the source of these issues?
magento-2.1 performance requirejs
bumped to the homepage by Community♦ 14 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".
How would we go about troubleshooting and resolving the source of these issues?
magento-2.1 performance requirejs
bumped to the homepage by Community♦ 14 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
The relevant code causing the error I included is:<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17
|
show 1 more comment
We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".
How would we go about troubleshooting and resolving the source of these issues?
magento-2.1 performance requirejs
We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".
How would we go about troubleshooting and resolving the source of these issues?
magento-2.1 performance requirejs
magento-2.1 performance requirejs
edited Jan 13 '17 at 14:11
Gordon Krauthamer
asked Jan 13 '17 at 3:29
Gordon KrauthamerGordon Krauthamer
161
161
bumped to the homepage by Community♦ 14 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 14 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
The relevant code causing the error I included is:<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17
|
show 1 more comment
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
The relevant code causing the error I included is:<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
The relevant code causing the error I included is:
<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
The relevant code causing the error I included is:
<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17
|
show 1 more comment
1 Answer
1
active
oldest
votes
Hope fully their might be a JQuery conflict.Try to short out the
You can assign a variable.You should add the below line of code where swMegamenu
located in.
var jq = jQuery.noConflict();
and use the variable jq instead of $ like jq(...).swMegamenu
Hope fully this might help you.
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154556%2frequirejs-components-sometimes-not-loading%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hope fully their might be a JQuery conflict.Try to short out the
You can assign a variable.You should add the below line of code where swMegamenu
located in.
var jq = jQuery.noConflict();
and use the variable jq instead of $ like jq(...).swMegamenu
Hope fully this might help you.
add a comment |
Hope fully their might be a JQuery conflict.Try to short out the
You can assign a variable.You should add the below line of code where swMegamenu
located in.
var jq = jQuery.noConflict();
and use the variable jq instead of $ like jq(...).swMegamenu
Hope fully this might help you.
add a comment |
Hope fully their might be a JQuery conflict.Try to short out the
You can assign a variable.You should add the below line of code where swMegamenu
located in.
var jq = jQuery.noConflict();
and use the variable jq instead of $ like jq(...).swMegamenu
Hope fully this might help you.
Hope fully their might be a JQuery conflict.Try to short out the
You can assign a variable.You should add the below line of code where swMegamenu
located in.
var jq = jQuery.noConflict();
and use the variable jq instead of $ like jq(...).swMegamenu
Hope fully this might help you.
answered Jan 13 '17 at 4:02
MujahidhMujahidh
1,41512036
1,41512036
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154556%2frequirejs-components-sometimes-not-loading%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
hope fully their might be a JQuery conflict.Try to short out the conflict.
– Mujahidh
Jan 13 '17 at 3:57
Please post your js code.
– Rakesh Jesadiya
Jan 13 '17 at 5:12
The relevant code causing the error I included is:
<script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>
– Gordon Krauthamer
Jan 13 '17 at 14:05
We're observing today that the site will load the components on a normal reload, but not on a hard reload.
– Gordon Krauthamer
Jan 13 '17 at 14:11
Also, the problems seem to only occur in Magento production mode, not developer mode.
– Gordon Krauthamer
Jan 13 '17 at 15:17