Why data bind template is not working on 2.2 or greater?

Can I Retrieve Email Addresses from BCC?

Adding empty element to declared container without declaring type of element

What to do when my ideas aren't chosen, when I strongly disagree with the chosen solution?

What is Sitecore Managed Cloud?

The most efficient algorithm to find all possible integer pairs which sum to a given integer

Invariance of results when scaling explanatory variables in logistic regression, is there a proof?

Can the electrostatic force be infinite in magnitude?

How to prevent YouTube from showing already watched videos?

How do I repair my stair bannister?

node command while defining a coordinate in TikZ

A known event to a history junkie

Is infinity mathematically observable?

Can I use my Chinese passport to enter China after I acquired another citizenship?

Is there a problem with hiding "forgot password" until it's needed?

Why does this part of the Space Shuttle launch pad seem to be floating in air?

You're three for three

Female=gender counterpart?

Why are on-board computers allowed to change controls without notifying the pilots?

What is the term when two people sing in harmony, but they aren't singing the same notes?

Can a controlled ghast be a leader of a pack of ghouls?

Visiting the UK as unmarried couple

Can I rely on these GitHub repository files?

Freedom of speech and where it applies

Would it be legal for a US State to ban exports of a natural resource?



Why data bind template is not working on 2.2 or greater?














0















I was studying about Knockout.js and how it works with Magento 2.



Then I reached the topic: template integration, in the first sample of it I'm presented to this notation:



<div data-bind="template:'Namespace_Module/sample'"></div>


Which will try to render the template located at:



app/code/Namespace/Module/view/frontend/web/template/sample.html


It's working in Magento versions equals/lower than 2.1.



In greater versions it's throwing the following error:



Uncaught TypeError: Unable to process binding "template: function()return 'Namespace_Module/sample' "
Message: Cannot read property 'name' of undefined
at RemoteTemplateEngine.makeTemplateSource (engine.js:55)
at RemoteTemplateEngine.renderTemplate (engine.js:116)
at executeTemplate (knockout.js:4886)
at ko.dependentObservable.disposeWhen (knockout.js:4950)
at evaluateImmediate (knockout.js:1737)
at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
at Object.ko.renderTemplate (knockout.js:4942)
at update (knockout.js:5080)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
at evaluateImmediate (knockout.js:1737)


I was trying to understand why it's happening looking for the change in github, but it's not clear to me:



https://github.com/magento/magento2/commit/d99043c097816388b2aeec1c23e10bf15e064b28#diff-9ec27f11f8253078a99c9d1e979a07f3



Now it requires a bindingContext (which contain the name attribute requested in exception) but I don't know how it's initialized.









share


























    0















    I was studying about Knockout.js and how it works with Magento 2.



    Then I reached the topic: template integration, in the first sample of it I'm presented to this notation:



    <div data-bind="template:'Namespace_Module/sample'"></div>


    Which will try to render the template located at:



    app/code/Namespace/Module/view/frontend/web/template/sample.html


    It's working in Magento versions equals/lower than 2.1.



    In greater versions it's throwing the following error:



    Uncaught TypeError: Unable to process binding "template: function()return 'Namespace_Module/sample' "
    Message: Cannot read property 'name' of undefined
    at RemoteTemplateEngine.makeTemplateSource (engine.js:55)
    at RemoteTemplateEngine.renderTemplate (engine.js:116)
    at executeTemplate (knockout.js:4886)
    at ko.dependentObservable.disposeWhen (knockout.js:4950)
    at evaluateImmediate (knockout.js:1737)
    at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
    at Object.ko.renderTemplate (knockout.js:4942)
    at update (knockout.js:5080)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
    at evaluateImmediate (knockout.js:1737)


    I was trying to understand why it's happening looking for the change in github, but it's not clear to me:



    https://github.com/magento/magento2/commit/d99043c097816388b2aeec1c23e10bf15e064b28#diff-9ec27f11f8253078a99c9d1e979a07f3



    Now it requires a bindingContext (which contain the name attribute requested in exception) but I don't know how it's initialized.









    share
























      0












      0








      0








      I was studying about Knockout.js and how it works with Magento 2.



      Then I reached the topic: template integration, in the first sample of it I'm presented to this notation:



      <div data-bind="template:'Namespace_Module/sample'"></div>


      Which will try to render the template located at:



      app/code/Namespace/Module/view/frontend/web/template/sample.html


      It's working in Magento versions equals/lower than 2.1.



      In greater versions it's throwing the following error:



      Uncaught TypeError: Unable to process binding "template: function()return 'Namespace_Module/sample' "
      Message: Cannot read property 'name' of undefined
      at RemoteTemplateEngine.makeTemplateSource (engine.js:55)
      at RemoteTemplateEngine.renderTemplate (engine.js:116)
      at executeTemplate (knockout.js:4886)
      at ko.dependentObservable.disposeWhen (knockout.js:4950)
      at evaluateImmediate (knockout.js:1737)
      at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
      at Object.ko.renderTemplate (knockout.js:4942)
      at update (knockout.js:5080)
      at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
      at evaluateImmediate (knockout.js:1737)


      I was trying to understand why it's happening looking for the change in github, but it's not clear to me:



      https://github.com/magento/magento2/commit/d99043c097816388b2aeec1c23e10bf15e064b28#diff-9ec27f11f8253078a99c9d1e979a07f3



      Now it requires a bindingContext (which contain the name attribute requested in exception) but I don't know how it's initialized.









      share














      I was studying about Knockout.js and how it works with Magento 2.



      Then I reached the topic: template integration, in the first sample of it I'm presented to this notation:



      <div data-bind="template:'Namespace_Module/sample'"></div>


      Which will try to render the template located at:



      app/code/Namespace/Module/view/frontend/web/template/sample.html


      It's working in Magento versions equals/lower than 2.1.



      In greater versions it's throwing the following error:



      Uncaught TypeError: Unable to process binding "template: function()return 'Namespace_Module/sample' "
      Message: Cannot read property 'name' of undefined
      at RemoteTemplateEngine.makeTemplateSource (engine.js:55)
      at RemoteTemplateEngine.renderTemplate (engine.js:116)
      at executeTemplate (knockout.js:4886)
      at ko.dependentObservable.disposeWhen (knockout.js:4950)
      at evaluateImmediate (knockout.js:1737)
      at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
      at Object.ko.renderTemplate (knockout.js:4942)
      at update (knockout.js:5080)
      at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
      at evaluateImmediate (knockout.js:1737)


      I was trying to understand why it's happening looking for the change in github, but it's not clear to me:



      https://github.com/magento/magento2/commit/d99043c097816388b2aeec1c23e10bf15e064b28#diff-9ec27f11f8253078a99c9d1e979a07f3



      Now it requires a bindingContext (which contain the name attribute requested in exception) but I don't know how it's initialized.







      template knockoutjs frontend-error





      share












      share










      share



      share










      asked 4 mins ago









      Eduan LenineEduan Lenine

      34




      34




















          0






          active

          oldest

          votes











          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%2f267325%2fwhy-data-bind-template-is-not-working-on-2-2-or-greater%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f267325%2fwhy-data-bind-template-is-not-working-on-2-2-or-greater%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

          Jet Time Laivasto | Lähteet | Aiheesta muualla | NavigointivalikkoJet Time - The CompanyThe CompanyManagementJet Time aloittaa lauantaina Suomi-rekisterissä olevalla Boeing 737 -koneellaJettime Finland Fleet Details and HistoryJettime Fleet Details and HistoryRegional Jet OÜ takes over ATR production for SASJet Time Returns To Its Core BusinessYhtiön kotisivutlaajentamalla

          Olympian arkeologinen museo Sisällysluettelo Historia ja rakennus | Kokoelmat | Lähteet | Aiheesta muualla | Navigointivalikko37°38′36″N, 21°37′46″EInfobox OKArchaeological Museum of Olympia: HistoryArchaeological Museum of Olympia: DescriptionΜουσείο Ιστορίας των Ολυμπιακών Αγώνων της Αρχαιότητας: ΙστορικόArchaeological Museum of Olympia

          Äpy Sisällysluettelo Äpyt kautta historian | Esimerkkejä Äpy-huumorista | Katso myös | Kirjallisuutta | Aiheesta muualla | Navigointivalikkowww.äpy.fi