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













7















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 ??



enter image description here



Google Chrome console error



enter image description here



enter image description here










share|improve this question
























  • 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
















7















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 ??



enter image description here



Google Chrome console error



enter image description here



enter image description here










share|improve this question
























  • 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














7












7








7


1






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 ??



enter image description here



Google Chrome console error



enter image description here



enter image description here










share|improve this question
















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 ??



enter image description here



Google Chrome console error



enter image description here



enter image description here







customer header magento-2.1.3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 '17 at 4:27







Zammuuz

















asked Feb 20 '17 at 5:56









ZammuuzZammuuz

2131314




2131314












  • 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


















  • 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

















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











7 Answers
7






active

oldest

votes


















5














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.






share|improve this answer























  • 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


















3














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>





share|improve this answer






























    1














    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






    share|improve this answer























    • 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


















    1














    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.






    share|improve this answer
































      0














      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.






      share|improve this answer






























        0














        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>





        share|improve this answer






























          0














          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>




          share








          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.



















            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
            );



            );













            draft saved

            draft discarded


















            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









            5














            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.






            share|improve this answer























            • 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















            5














            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.






            share|improve this answer























            • 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













            5












            5








            5







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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

















            • 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













            3














            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>





            share|improve this answer



























              3














              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>





              share|improve this answer

























                3












                3








                3







                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>





                share|improve this answer













                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>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 12 '17 at 7:56









                Nadeem0035Nadeem0035

                563410




                563410





















                    1














                    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






                    share|improve this answer























                    • 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















                    1














                    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






                    share|improve this answer























                    • 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













                    1












                    1








                    1







                    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






                    share|improve this answer













                    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







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    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

















                    • 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











                    1














                    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.






                    share|improve this answer





























                      1














                      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.






                      share|improve this answer



























                        1












                        1








                        1







                        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.






                        share|improve this answer















                        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.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        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





















                            0














                            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.






                            share|improve this answer



























                              0














                              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.






                              share|improve this answer

























                                0












                                0








                                0







                                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.






                                share|improve this answer













                                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.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Jun 11 '18 at 23:33









                                Joshua FrickeJoshua Fricke

                                18719




                                18719





















                                    0














                                    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>





                                    share|improve this answer



























                                      0














                                      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>





                                      share|improve this answer

























                                        0












                                        0








                                        0







                                        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>





                                        share|improve this answer













                                        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>






                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Mar 7 at 12:14









                                        RaviRavi

                                        19013




                                        19013





















                                            0














                                            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>




                                            share








                                            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.
























                                              0














                                              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>




                                              share








                                              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.






















                                                0












                                                0








                                                0







                                                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>




                                                share








                                                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>





                                                share








                                                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.








                                                share


                                                share






                                                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









                                                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.



























                                                    draft saved

                                                    draft discarded
















































                                                    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.




                                                    draft saved


                                                    draft discarded














                                                    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





















































                                                    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







                                                    Popular posts from this blog

                                                    Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

                                                    Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                                                    How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2