Magento 2: Uncaught Error: Script error for: smartmenusHow to add bootstrap.js in magento2Custom js fie not working Magento 2Magento 2 adminhtml - custom block gives blank pageUncaught Reference ErrorUncaught Error: Mismatched anonymous define() module in magento 2 .?Uncaught reference error - is not defined - Magento 2Script error for validator-mixinrequirejs-config, requirejs errorsUncaught SyntaxError: Unable to parse bindings. checkoutpage not rendered when click on place order buttonUncaught Error: Mismatched anonymous define() magento 2.2.4Owl Carousel for custom them for Magento 2.2.4
Can a 40amp breaker be used safely and without issue with a 40amp device on 6AWG wire?
Will users know a CardView is clickable
The last tree in the Universe
How long would it take for sucrose to undergo hydrolysis in boiling water?
How many times to repeat an event with known probability before it has occurred a number of times
What should I be aware of in buying second-hand sinks and toilets?
Boss making me feel guilty for leaving the company at the end of my internship
Looking for an iPhone app for working out chess problems
Are soroban (Japanese abacus) classes worth doing?
Is there a term for someone whose preferred policies are a mix of Left and Right?
What is the difference between state-based effects and effects on the stack?
What things do I only get a limited opportunity to take photos of?
How did the European Union reach the figure of 3% as a maximum allowed deficit?
Does PC weight have a mechanical effect?
What did the 8086 (and 8088) do upon encountering an illegal instruction?
Why can't we feel the Earth's revolution?
How do I become a better writer when I hate reading?
Does WiFi affect the quality of images downloaded from the internet?
...and then she held the gun
Interview was just a one hour panel. Got an offer the next day; do I accept or is this a red flag?
Is it possible to have battery technology that can't be duplicated?
The title "Mord mit Aussicht" explained
mathrm in LaTeX
100-doors puzzle
Magento 2: Uncaught Error: Script error for: smartmenus
How to add bootstrap.js in magento2Custom js fie not working Magento 2Magento 2 adminhtml - custom block gives blank pageUncaught Reference ErrorUncaught Error: Mismatched anonymous define() module in magento 2 .?Uncaught reference error - is not defined - Magento 2Script error for validator-mixinrequirejs-config, requirejs errorsUncaught SyntaxError: Unable to parse bindings. checkoutpage not rendered when click on place order buttonUncaught Error: Mismatched anonymous define() magento 2.2.4Owl Carousel for custom them for Magento 2.2.4
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to implement the navigation menu with Bootstrap Smartmenus but the theme does not pick up the javaScript. Can somebody help me out?
Vendor/Name/requirejs-config.js
var config =
map:
'*':
'bootstrap':'js/bootstrap',
'smartmenus':'js/jquery.smartmenus',
'bssmartmenus':'js/jquery.smartmenus.bootstrap.min',
,
shim:
'bootstrap':
'deps': ['jquery']
,
'smartmenus':
'deps': ['jquery', 'bootstrap']
,
'bssmartmenus':
'deps': ['jquery', 'bootstrap', 'smartmenus']
Vendor/Name/Magento_Theme/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head">
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-">
<arguments>
<!-- RequireJs library enabled -->
<argument name="file" xsi:type="string">requirejs/require.js</argument>
</arguments>
</block>
<block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
</referenceBlock>
.....
Vendor/Name/Magento_Theme/templates/html/menu.phtml
<?php
/**
* General template for displaying group of blocks devided into sections
*/
// print_r($block->getRootCategories());
$categories = $block->getRootCategories();
$nosub = [];
$count = 0;
?>
<?php if ($categories): ?>
<nav class="navbar navbar-inverse nav2 ">
<div id="navbar2">
<ul class="nav navbar-nav">
<?php foreach ($categories as $_category): ?>
<?php
$subcategories = $block->getSubCategories($_category);
if ($subcategories):
$count++;
?>
<li class="<?= $count==1?'nav2firstlink':''?>" ><a href="<?= $block->getCategoryUrl($_category) ?>"><?= $_category->getName(); ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<?php foreach ($subcategories as $_sub): ?>
<li><a href="<?= $block->getCategoryUrl($_sub) ?>"><?= $_sub->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</li>
<?php else: $nosub[] = $_category; ?>
<?php endif; ?>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php if (count($nosub) > 0) : ?>
<nav class="navbar navbar-inverse nav3 ">
<div id="navbar3">
<ul class="nav navbar-nav">
<?php foreach($nosub as $_cat): ?>
<li><a href="<?= $block->getCategoryUrl($_cat) ?>"><?= $_cat->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php endif; ?>
<script type="text/javascript">
requirejs(['jquery', 'bootstrap', 'smartmenus', 'bssmartmenus'], function(jQuery, Bootstrap, SmartMenus, bsSmartMenus)
jQuery(function()
jQuery('.nav2').smartmenus();
);
);
</script>
<?php endif; ?>
Please let me know, how should I fix this issue.
On further checking with the logs, found these:
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' element cannot be added as child to 'head', because the latter doesn't exist [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' tries to reorder itself towards '', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs-config' tries to reorder itself towards 'requirejs', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bootstrap.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/jquery-storageapi.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/priceUtils.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/ui.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bssmartmenus.js' [] []
[2018-06-27 06:40:21] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/validate.js' [] []
Looking on how to resolve this issue!!?
magento2 requirejs magento2.2.4 custom-theme
add a comment |
I am trying to implement the navigation menu with Bootstrap Smartmenus but the theme does not pick up the javaScript. Can somebody help me out?
Vendor/Name/requirejs-config.js
var config =
map:
'*':
'bootstrap':'js/bootstrap',
'smartmenus':'js/jquery.smartmenus',
'bssmartmenus':'js/jquery.smartmenus.bootstrap.min',
,
shim:
'bootstrap':
'deps': ['jquery']
,
'smartmenus':
'deps': ['jquery', 'bootstrap']
,
'bssmartmenus':
'deps': ['jquery', 'bootstrap', 'smartmenus']
Vendor/Name/Magento_Theme/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head">
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-">
<arguments>
<!-- RequireJs library enabled -->
<argument name="file" xsi:type="string">requirejs/require.js</argument>
</arguments>
</block>
<block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
</referenceBlock>
.....
Vendor/Name/Magento_Theme/templates/html/menu.phtml
<?php
/**
* General template for displaying group of blocks devided into sections
*/
// print_r($block->getRootCategories());
$categories = $block->getRootCategories();
$nosub = [];
$count = 0;
?>
<?php if ($categories): ?>
<nav class="navbar navbar-inverse nav2 ">
<div id="navbar2">
<ul class="nav navbar-nav">
<?php foreach ($categories as $_category): ?>
<?php
$subcategories = $block->getSubCategories($_category);
if ($subcategories):
$count++;
?>
<li class="<?= $count==1?'nav2firstlink':''?>" ><a href="<?= $block->getCategoryUrl($_category) ?>"><?= $_category->getName(); ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<?php foreach ($subcategories as $_sub): ?>
<li><a href="<?= $block->getCategoryUrl($_sub) ?>"><?= $_sub->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</li>
<?php else: $nosub[] = $_category; ?>
<?php endif; ?>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php if (count($nosub) > 0) : ?>
<nav class="navbar navbar-inverse nav3 ">
<div id="navbar3">
<ul class="nav navbar-nav">
<?php foreach($nosub as $_cat): ?>
<li><a href="<?= $block->getCategoryUrl($_cat) ?>"><?= $_cat->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php endif; ?>
<script type="text/javascript">
requirejs(['jquery', 'bootstrap', 'smartmenus', 'bssmartmenus'], function(jQuery, Bootstrap, SmartMenus, bsSmartMenus)
jQuery(function()
jQuery('.nav2').smartmenus();
);
);
</script>
<?php endif; ?>
Please let me know, how should I fix this issue.
On further checking with the logs, found these:
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' element cannot be added as child to 'head', because the latter doesn't exist [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' tries to reorder itself towards '', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs-config' tries to reorder itself towards 'requirejs', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bootstrap.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/jquery-storageapi.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/priceUtils.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/ui.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bssmartmenus.js' [] []
[2018-06-27 06:40:21] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/validate.js' [] []
Looking on how to resolve this issue!!?
magento2 requirejs magento2.2.4 custom-theme
Why you added this code<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
– kunj
Jun 26 '18 at 5:33
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11
add a comment |
I am trying to implement the navigation menu with Bootstrap Smartmenus but the theme does not pick up the javaScript. Can somebody help me out?
Vendor/Name/requirejs-config.js
var config =
map:
'*':
'bootstrap':'js/bootstrap',
'smartmenus':'js/jquery.smartmenus',
'bssmartmenus':'js/jquery.smartmenus.bootstrap.min',
,
shim:
'bootstrap':
'deps': ['jquery']
,
'smartmenus':
'deps': ['jquery', 'bootstrap']
,
'bssmartmenus':
'deps': ['jquery', 'bootstrap', 'smartmenus']
Vendor/Name/Magento_Theme/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head">
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-">
<arguments>
<!-- RequireJs library enabled -->
<argument name="file" xsi:type="string">requirejs/require.js</argument>
</arguments>
</block>
<block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
</referenceBlock>
.....
Vendor/Name/Magento_Theme/templates/html/menu.phtml
<?php
/**
* General template for displaying group of blocks devided into sections
*/
// print_r($block->getRootCategories());
$categories = $block->getRootCategories();
$nosub = [];
$count = 0;
?>
<?php if ($categories): ?>
<nav class="navbar navbar-inverse nav2 ">
<div id="navbar2">
<ul class="nav navbar-nav">
<?php foreach ($categories as $_category): ?>
<?php
$subcategories = $block->getSubCategories($_category);
if ($subcategories):
$count++;
?>
<li class="<?= $count==1?'nav2firstlink':''?>" ><a href="<?= $block->getCategoryUrl($_category) ?>"><?= $_category->getName(); ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<?php foreach ($subcategories as $_sub): ?>
<li><a href="<?= $block->getCategoryUrl($_sub) ?>"><?= $_sub->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</li>
<?php else: $nosub[] = $_category; ?>
<?php endif; ?>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php if (count($nosub) > 0) : ?>
<nav class="navbar navbar-inverse nav3 ">
<div id="navbar3">
<ul class="nav navbar-nav">
<?php foreach($nosub as $_cat): ?>
<li><a href="<?= $block->getCategoryUrl($_cat) ?>"><?= $_cat->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php endif; ?>
<script type="text/javascript">
requirejs(['jquery', 'bootstrap', 'smartmenus', 'bssmartmenus'], function(jQuery, Bootstrap, SmartMenus, bsSmartMenus)
jQuery(function()
jQuery('.nav2').smartmenus();
);
);
</script>
<?php endif; ?>
Please let me know, how should I fix this issue.
On further checking with the logs, found these:
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' element cannot be added as child to 'head', because the latter doesn't exist [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' tries to reorder itself towards '', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs-config' tries to reorder itself towards 'requirejs', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bootstrap.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/jquery-storageapi.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/priceUtils.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/ui.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bssmartmenus.js' [] []
[2018-06-27 06:40:21] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/validate.js' [] []
Looking on how to resolve this issue!!?
magento2 requirejs magento2.2.4 custom-theme
I am trying to implement the navigation menu with Bootstrap Smartmenus but the theme does not pick up the javaScript. Can somebody help me out?
Vendor/Name/requirejs-config.js
var config =
map:
'*':
'bootstrap':'js/bootstrap',
'smartmenus':'js/jquery.smartmenus',
'bssmartmenus':'js/jquery.smartmenus.bootstrap.min',
,
shim:
'bootstrap':
'deps': ['jquery']
,
'smartmenus':
'deps': ['jquery', 'bootstrap']
,
'bssmartmenus':
'deps': ['jquery', 'bootstrap', 'smartmenus']
Vendor/Name/Magento_Theme/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head">
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-">
<arguments>
<!-- RequireJs library enabled -->
<argument name="file" xsi:type="string">requirejs/require.js</argument>
</arguments>
</block>
<block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
</referenceBlock>
.....
Vendor/Name/Magento_Theme/templates/html/menu.phtml
<?php
/**
* General template for displaying group of blocks devided into sections
*/
// print_r($block->getRootCategories());
$categories = $block->getRootCategories();
$nosub = [];
$count = 0;
?>
<?php if ($categories): ?>
<nav class="navbar navbar-inverse nav2 ">
<div id="navbar2">
<ul class="nav navbar-nav">
<?php foreach ($categories as $_category): ?>
<?php
$subcategories = $block->getSubCategories($_category);
if ($subcategories):
$count++;
?>
<li class="<?= $count==1?'nav2firstlink':''?>" ><a href="<?= $block->getCategoryUrl($_category) ?>"><?= $_category->getName(); ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<?php foreach ($subcategories as $_sub): ?>
<li><a href="<?= $block->getCategoryUrl($_sub) ?>"><?= $_sub->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</li>
<?php else: $nosub[] = $_category; ?>
<?php endif; ?>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php if (count($nosub) > 0) : ?>
<nav class="navbar navbar-inverse nav3 ">
<div id="navbar3">
<ul class="nav navbar-nav">
<?php foreach($nosub as $_cat): ?>
<li><a href="<?= $block->getCategoryUrl($_cat) ?>"><?= $_cat->getName(); ?></a></li>
<?php endforeach;?>
</ul>
</div>
</nav>
<?php endif; ?>
<script type="text/javascript">
requirejs(['jquery', 'bootstrap', 'smartmenus', 'bssmartmenus'], function(jQuery, Bootstrap, SmartMenus, bsSmartMenus)
jQuery(function()
jQuery('.nav2').smartmenus();
);
);
</script>
<?php endif; ?>
Please let me know, how should I fix this issue.
On further checking with the logs, found these:
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' element cannot be added as child to 'head', because the latter doesn't exist [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs' tries to reorder itself towards '', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:10] main.INFO: Broken reference: the 'requirejs-config' tries to reorder itself towards 'requirejs', but their parents are different: 'head' and '' respectively. [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bootstrap.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/jquery-storageapi.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/priceUtils.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/ui.js' [] []
[2018-06-27 06:40:20] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/bssmartmenus.js' [] []
[2018-06-27 06:40:21] main.CRITICAL: Unable to resolve the source file for 'frontend/Vendor/Name/en_US/jquery/validate.js' [] []
Looking on how to resolve this issue!!?
magento2 requirejs magento2.2.4 custom-theme
magento2 requirejs magento2.2.4 custom-theme
edited Jun 27 '18 at 6:49
Anish Karim
asked Jun 26 '18 at 4:31
Anish KarimAnish Karim
72111
72111
Why you added this code<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
– kunj
Jun 26 '18 at 5:33
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11
add a comment |
Why you added this code<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>
– kunj
Jun 26 '18 at 5:33
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11
Why you added this code
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>– kunj
Jun 26 '18 at 5:33
Why you added this code
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>– kunj
Jun 26 '18 at 5:33
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11
add a comment |
1 Answer
1
active
oldest
votes
Its because the path is not rendered properly. Please check this link
Custom js fie not working Magento 2
Guess it will help you.
add a comment |
Your Answer
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%2f231322%2fmagento-2-uncaught-error-script-error-for-smartmenus%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
Its because the path is not rendered properly. Please check this link
Custom js fie not working Magento 2
Guess it will help you.
add a comment |
Its because the path is not rendered properly. Please check this link
Custom js fie not working Magento 2
Guess it will help you.
add a comment |
Its because the path is not rendered properly. Please check this link
Custom js fie not working Magento 2
Guess it will help you.
Its because the path is not rendered properly. Please check this link
Custom js fie not working Magento 2
Guess it will help you.
answered Jun 27 '18 at 9:04
Bridgit ThomasBridgit Thomas
8311
8311
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%2f231322%2fmagento-2-uncaught-error-script-error-for-smartmenus%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
Why you added this code
<block class="MagentoThemeBlockHtmlHeadScript" name="requirejs" before="-"> <arguments> <!-- RequireJs library enabled --> <argument name="file" xsi:type="string">requirejs/require.js</argument> </arguments> </block> <block class="MagentoRequireJsBlockHtmlHeadConfig" name="requirejs-config" after="requirejs"/>– kunj
Jun 26 '18 at 5:33
When I get this error, I found another similar post, on how to implement bootstrap. In order to enable the requirejs it's added in the default.xml. [magento.stackexchange.com/questions/107763/…
– Anish Karim
Jun 26 '18 at 6:11