cannot read property 'section loadurl' of undefinedMagento2: Re generate css file in pub/static folderMagento 2: Requested store is not foundDependecy error Magento 2 ('sectionLoadUrl' error)Magento2.1.3 Deploy Version errorcannot read property 'section loadurl' of undefined in customer-data.js:89 Magento2Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefinedHow to fix: “HEADER ALREADY SENT” and GD2?php-fpm workaround and Undefined index noticesBackend edit customer: Cannot read property 'show' of undefinedCannot customize header block by custom moduleKnockoutJS cannot read property 'fromJS' of undefinedIssues with deplyoing static files command and frontend loses css and jsHeader issues with custom linksMagento 2 - Very slow performance, Cache/static files issues after disabling cache and flushing static files cacheNo content is displaying on the main content areaCheckout hangs because of: Uncaught TypeError: Cannot read property 'US' of undefined
Unreachable code, but reachable with exception
How to make readers know that my work has used a hidden constraint?
The three point beverage
Coworker uses her breast-pump everywhere in the office
Identifying the interval from A♭ to D♯
Rejected in 4th interview round citing insufficient years of experience
Sword in the Stone story where the sword was held in place by electromagnets
How does Dispel Magic work against Stoneskin?
Does anyone draw a parallel between Haman selling himself to Mordechai and Esav selling the birthright to Yaakov?
Extension of Splitting Fields over An Arbitrary Field
Do f-stop and exposure time perfectly cancel?
How is the Swiss post e-voting system supposed to work, and how was it wrong?
Excess Zinc in garden soil
Does splitting a potentially monolithic application into several smaller ones help prevent bugs?
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
"One can do his homework in the library"
What to do when during a meeting client people start to fight (even physically) with each others?
Is it ok to include an epilogue dedicated to colleagues who passed away in the end of the manuscript?
Examples of odd-dimensional manifolds that do not admit contact structure
Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements
Want to switch to tankless, but can I use my existing wiring?
If the Captain's screens are out, does he switch seats with the co-pilot?
Can the druid cantrip Thorn Whip really defeat a water weird this easily?
What exactly is the purpose of connection links straped between the rocket and the launch pad
cannot read property 'section loadurl' of undefined
Magento2: Re generate css file in pub/static folderMagento 2: Requested store is not foundDependecy error Magento 2 ('sectionLoadUrl' error)Magento2.1.3 Deploy Version errorcannot read property 'section loadurl' of undefined in customer-data.js:89 Magento2Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefinedHow to fix: “HEADER ALREADY SENT” and GD2?php-fpm workaround and Undefined index noticesBackend edit customer: Cannot read property 'show' of undefinedCannot customize header block by custom moduleKnockoutJS cannot read property 'fromJS' of undefinedIssues with deplyoing static files command and frontend loses css and jsHeader issues with custom linksMagento 2 - Very slow performance, Cache/static files issues after disabling cache and flushing static files cacheNo content is displaying on the main content areaCheckout hangs because of: Uncaught TypeError: Cannot read property 'US' of undefined
I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not showing.
Tried a lot to debug the error but not successful. Any help ??
Google Chrome console error
customer header magento-2.1.3
|
show 12 more comments
I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not showing.
Tried a lot to debug the error but not successful. Any help ??
Google Chrome console error
customer header magento-2.1.3
have you triedstatic-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
1
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00
|
show 12 more comments
I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not showing.
Tried a lot to debug the error but not successful. Any help ??
Google Chrome console error
customer header magento-2.1.3
I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not showing.
Tried a lot to debug the error but not successful. Any help ??
Google Chrome console error
customer header magento-2.1.3
customer header magento-2.1.3
edited Feb 21 '17 at 4:27
Zammuuz
asked Feb 20 '17 at 5:56
![](https://i.stack.imgur.com/h0B8i.jpg?s=32&g=1)
![](https://i.stack.imgur.com/h0B8i.jpg?s=32&g=1)
ZammuuzZammuuz
2131314
2131314
have you triedstatic-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
1
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00
|
show 12 more comments
have you triedstatic-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
1
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00
have you tried
static-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
have you tried
static-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
1
1
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00
|
show 12 more comments
7 Answers
7
active
oldest
votes
The data that code references (sectionLoadUrl
) is usually set in the following snippet that (should) be on every Magento front-end page
<script type="text/x-magento-init">
"*":"Magento_Customer/js/customer-data":"sectionLoadUrl":"http://magento-2-1-4.dev/customer/section/load/","cookieLifeTime":"3600","updateSessionUrl":"http://magento-2-1-4.dev/customer/account/updateSession/"
</script>
So, either something in your system removed this snippet, or you're somehow invoking the functionality in Magento_Customer/js/customer-data
before the snippet's had a chance to run.
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
add a comment |
I fixed it by adding following code to <Magento_directry>/app/design/frontend/<Vendor>/<theme>/Magento_Theme/layout/default.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
add a comment |
Check your custom Module model files If you have installed some. There must be some typo error. I have faced the same problem and for me, it works as I have mistaken in Namespace path and due to that typo error it was generating same js error on all pages if not then remove module-customer from pub and try deploy theme again
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
add a comment |
I solved it removing the default.xml
from my theme Magento_Customer
.
app/design/frontend/Theme/Name/Magento_Customer/layout/default.xml
I think this custom module is loading before the snipped and the url
for ajax
call is not defined.
add a comment |
In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData)
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
);
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace();
call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
add a comment |
Fixed this using window on load:
<script type="text/javascript">
require([
'jquery'
],
function($)
$(window).on("load", function()
require([
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry)
$(document).ready(function()
/** Do your code here */
);
);
);
);
</script>
add a comment |
I had previously removed "content" container from theme.xml,
I fixed it by adding following code to theme.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f160707%2fcannot-read-property-section-loadurl-of-undefined%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
The data that code references (sectionLoadUrl
) is usually set in the following snippet that (should) be on every Magento front-end page
<script type="text/x-magento-init">
"*":"Magento_Customer/js/customer-data":"sectionLoadUrl":"http://magento-2-1-4.dev/customer/section/load/","cookieLifeTime":"3600","updateSessionUrl":"http://magento-2-1-4.dev/customer/account/updateSession/"
</script>
So, either something in your system removed this snippet, or you're somehow invoking the functionality in Magento_Customer/js/customer-data
before the snippet's had a chance to run.
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
add a comment |
The data that code references (sectionLoadUrl
) is usually set in the following snippet that (should) be on every Magento front-end page
<script type="text/x-magento-init">
"*":"Magento_Customer/js/customer-data":"sectionLoadUrl":"http://magento-2-1-4.dev/customer/section/load/","cookieLifeTime":"3600","updateSessionUrl":"http://magento-2-1-4.dev/customer/account/updateSession/"
</script>
So, either something in your system removed this snippet, or you're somehow invoking the functionality in Magento_Customer/js/customer-data
before the snippet's had a chance to run.
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
add a comment |
The data that code references (sectionLoadUrl
) is usually set in the following snippet that (should) be on every Magento front-end page
<script type="text/x-magento-init">
"*":"Magento_Customer/js/customer-data":"sectionLoadUrl":"http://magento-2-1-4.dev/customer/section/load/","cookieLifeTime":"3600","updateSessionUrl":"http://magento-2-1-4.dev/customer/account/updateSession/"
</script>
So, either something in your system removed this snippet, or you're somehow invoking the functionality in Magento_Customer/js/customer-data
before the snippet's had a chance to run.
The data that code references (sectionLoadUrl
) is usually set in the following snippet that (should) be on every Magento front-end page
<script type="text/x-magento-init">
"*":"Magento_Customer/js/customer-data":"sectionLoadUrl":"http://magento-2-1-4.dev/customer/section/load/","cookieLifeTime":"3600","updateSessionUrl":"http://magento-2-1-4.dev/customer/account/updateSession/"
</script>
So, either something in your system removed this snippet, or you're somehow invoking the functionality in Magento_Customer/js/customer-data
before the snippet's had a chance to run.
answered Feb 21 '17 at 15:31
Alan StormAlan Storm
29k19118308
29k19118308
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
add a comment |
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
M using this in footer.phtml file require([ 'Magento_Customer/js/customer-data' ], function (customerData) var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); ); And getting error as above. How to solve this?
– Magecode
Aug 26 '17 at 13:23
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
@Magecode You should probably post that as a new question with more more details, and not as a comment.
– Alan Storm
Aug 27 '17 at 20:41
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
It's possible that this is an example of this issue: github.com/magento/magento2/pull/12314
– Scott Buchanan
Nov 16 '17 at 20:45
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
@Magecode could you fix this error?
– bpoiss
Dec 7 '17 at 9:53
add a comment |
I fixed it by adding following code to <Magento_directry>/app/design/frontend/<Vendor>/<theme>/Magento_Theme/layout/default.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
add a comment |
I fixed it by adding following code to <Magento_directry>/app/design/frontend/<Vendor>/<theme>/Magento_Theme/layout/default.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
add a comment |
I fixed it by adding following code to <Magento_directry>/app/design/frontend/<Vendor>/<theme>/Magento_Theme/layout/default.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
I fixed it by adding following code to <Magento_directry>/app/design/frontend/<Vendor>/<theme>/Magento_Theme/layout/default.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
answered Apr 12 '17 at 7:56
Nadeem0035Nadeem0035
563410
563410
add a comment |
add a comment |
Check your custom Module model files If you have installed some. There must be some typo error. I have faced the same problem and for me, it works as I have mistaken in Namespace path and due to that typo error it was generating same js error on all pages if not then remove module-customer from pub and try deploy theme again
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
add a comment |
Check your custom Module model files If you have installed some. There must be some typo error. I have faced the same problem and for me, it works as I have mistaken in Namespace path and due to that typo error it was generating same js error on all pages if not then remove module-customer from pub and try deploy theme again
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
add a comment |
Check your custom Module model files If you have installed some. There must be some typo error. I have faced the same problem and for me, it works as I have mistaken in Namespace path and due to that typo error it was generating same js error on all pages if not then remove module-customer from pub and try deploy theme again
Check your custom Module model files If you have installed some. There must be some typo error. I have faced the same problem and for me, it works as I have mistaken in Namespace path and due to that typo error it was generating same js error on all pages if not then remove module-customer from pub and try deploy theme again
answered Feb 20 '17 at 8:28
Shubham MathurShubham Mathur
174113
174113
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
add a comment |
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
Hi I have updated my question with a new image from chrome console. It shows sectionLoadUrl is undefined in options.sectionLoadUrl in Magento/Customer/view/frontend/web/js/customer-data.js.. Any idea how to resolve this?
– Zammuuz
Feb 20 '17 at 8:32
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
I dont have any custom Module model files.. Anyhow i have double checked the namespaces of my custom Module Block files. This was working fine till morning. I was doing some style changes in my cms pages and footer. :( after that this error is showing while accessing home,login,register pages. CMS pages are fine.
– Zammuuz
Feb 20 '17 at 11:03
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
can you please explain the changes you have done in CMS page ?
– Shubham Mathur
Feb 20 '17 at 11:35
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
Can you please send me the complete right side of chrome screenshot which you have attached. i cannot see the URL where it's generating error in pub file
– Shubham Mathur
Feb 20 '17 at 11:39
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
I have updated the chrome error image. the error is occurring in customer-data.js file. The changes I have made so far are 1) created custom theme with custom header, navigation menu, custom store switcher in header,custom footer. that's it.
– Zammuuz
Feb 21 '17 at 2:02
add a comment |
I solved it removing the default.xml
from my theme Magento_Customer
.
app/design/frontend/Theme/Name/Magento_Customer/layout/default.xml
I think this custom module is loading before the snipped and the url
for ajax
call is not defined.
add a comment |
I solved it removing the default.xml
from my theme Magento_Customer
.
app/design/frontend/Theme/Name/Magento_Customer/layout/default.xml
I think this custom module is loading before the snipped and the url
for ajax
call is not defined.
add a comment |
I solved it removing the default.xml
from my theme Magento_Customer
.
app/design/frontend/Theme/Name/Magento_Customer/layout/default.xml
I think this custom module is loading before the snipped and the url
for ajax
call is not defined.
I solved it removing the default.xml
from my theme Magento_Customer
.
app/design/frontend/Theme/Name/Magento_Customer/layout/default.xml
I think this custom module is loading before the snipped and the url
for ajax
call is not defined.
edited Sep 29 '17 at 5:01
Manoj Deswal
4,31991743
4,31991743
answered May 24 '17 at 1:57
Enrique BarchiesiEnrique Barchiesi
111
111
add a comment |
add a comment |
In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData)
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
);
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace();
call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
add a comment |
In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData)
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
);
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace();
call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
add a comment |
In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData)
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
);
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace();
call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
In our case this was a bit of code in a default template which was loading the customer-data.js file after it had already been called on the success page.
We found file: vendor/magento/module-checkout/view/frontend/templates/success.phtml
was loading this code:
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData)
var sections = ['cart'];
customerData.invalidate(sections);
customerData.reload(sections, true);
);
</script>
Removing this code fixed it, which we did by creating a copy of this file in our theme templates directory and removing the offending code snippet.
You can use Chrome Dev tools to find out where the error was happening and then just before in that file on your local dev add in a console.trace();
call to establish what was calling the function which is throwing the error in the console. Follow the chain to where you are loading things improperly.
answered Jun 11 '18 at 23:33
![](https://i.stack.imgur.com/MvaZU.jpg?s=32&g=1)
![](https://i.stack.imgur.com/MvaZU.jpg?s=32&g=1)
Joshua FrickeJoshua Fricke
18719
18719
add a comment |
add a comment |
Fixed this using window on load:
<script type="text/javascript">
require([
'jquery'
],
function($)
$(window).on("load", function()
require([
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry)
$(document).ready(function()
/** Do your code here */
);
);
);
);
</script>
add a comment |
Fixed this using window on load:
<script type="text/javascript">
require([
'jquery'
],
function($)
$(window).on("load", function()
require([
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry)
$(document).ready(function()
/** Do your code here */
);
);
);
);
</script>
add a comment |
Fixed this using window on load:
<script type="text/javascript">
require([
'jquery'
],
function($)
$(window).on("load", function()
require([
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry)
$(document).ready(function()
/** Do your code here */
);
);
);
);
</script>
Fixed this using window on load:
<script type="text/javascript">
require([
'jquery'
],
function($)
$(window).on("load", function()
require([
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry)
$(document).ready(function()
/** Do your code here */
);
);
);
);
</script>
answered Mar 7 at 12:14
RaviRavi
19013
19013
add a comment |
add a comment |
I had previously removed "content" container from theme.xml,
I fixed it by adding following code to theme.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I had previously removed "content" container from theme.xml,
I fixed it by adding following code to theme.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I had previously removed "content" container from theme.xml,
I fixed it by adding following code to theme.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I had previously removed "content" container from theme.xml,
I fixed it by adding following code to theme.xml
<referenceContainer name="content">
<block name="customer.section.config" class="MagentoCustomerBlockSectionConfig"
template="Magento_Customer::js/section-config.phtml"/>
<block name="customer.customer.data"
class="MagentoCustomerBlockCustomerData"
template="Magento_Customer::js/customer-data.phtml"/>
</referenceContainer>
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 25 mins ago
![](https://i.stack.imgur.com/syYC9.jpg?s=32&g=1)
![](https://i.stack.imgur.com/syYC9.jpg?s=32&g=1)
Humaz MirajHumaz Miraj
1
1
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Humaz Miraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f160707%2fcannot-read-property-section-loadurl-of-undefined%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
have you tried
static-content deploy
– Murtuza Zabuawala
Feb 20 '17 at 6:07
1
@MurtuzaZabuawala : Yes... But didn't worked
– Zammuuz
Feb 20 '17 at 6:37
please let me know which command Have you used for deploy, give full command.
– Rakesh Jesadiya
Feb 20 '17 at 6:56
@RakeshJesadiya : Hi I used this command C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy and the result was Successful: 2217 files; errors: 0
– Zammuuz
Feb 20 '17 at 6:59
please run command, C:wampbinphpphp5.6.30> php C:wampwwwmagentobinmagento setup:static-content:deploy en_US en_GB let me know after run this command.
– Rakesh Jesadiya
Feb 20 '17 at 7:00