Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

$(...).appendTo(...).on(...).dxTextBox is not a function


Hello,

We are using the Metronic theme in a .NET Core 7 MVC project. Additionally, we are utilizing DevExpress components in the project. On some pages, we are encountering errors in the form of "$( )....dxWidget is not a function" An example of the error message we receive on a specific page is: "$(...).appendTo(...).on(...).dxTextBox is not a function."

We are confident that we have correctly arranged the jQuery and DevExpress references in the layout files.

/////
<head>
<title>TimeSheet Giriş Ekranı - Keenthemes</title>
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="" />
<link href="/css/devextreme/bootstrap.css" rel="stylesheet" />
<link href="/css/devextreme/dx.common.css" rel="stylesheet" />
<link href="/css/devextreme/dx.material.blue.light.compact.css" rel="stylesheet" />
<script src="/js/devextreme/jquery.js"></script>
<script src="/js/devextreme/dx.all.js"></script>
<script src="/js/devextreme/aspnet/dx.aspnet.mvc.js"></script>
<script src="/js/devextreme/aspnet/dx.aspnet.data.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="/js/devextreme/bootstrap.js"></script>
......
<!--end::Scrolltop-->


<!--begin::Global Javascript(mandatory)-->
<script src="/assets/plugins/global/plugins.bundle.js"></script>
<script src="/assets/js/scripts.bundle.js"></script>
<!--end::Global Javascript-->

<!--begin::Vendors Javascript(optional)-->
<!--end::Vendors Javascript-->

<!--begin::Custom Javascript(optional)-->
<!--end::Custom Javascript-->

<!-- Visual Studio Browser Link -->
<script type="text/javascript" src="/_vs/browserLink" async="async" id="__browserLink_initializationData" data-requestId="78d04526ed2a420e92c9d165e216cd9d" data-requestMappingFromServer="false" data-connectUrl="http://localhost:53864/393276ac730a4d3ab3557544b4b7004b/browserLink"></script>
<!-- End Browser Link -->

<script src="/_framework/aspnetcore-browser-refresh.js"></script></body>
<!--end::Body-->

</html>
//////

Upon investigation, we have identified that the "assets/plugins/global/plugins.bundle.js" file is causing this issue. When we remove the reference to this file, we no longer encounter the error mentioned above. However, removing this reference also causes the theme not to function as intended.

The error message we are receiving is:
"Timesheets:7931 Uncaught TypeError: $(...).appendTo(...).on(...).dxTextBox is not a function
at t.pivotCellClick (Timesheets:7931:18)
at Object.execute (dx.all.js:9:1570753)
at t._executeAction (dx.all.js:9:1569874)
at t.execute (dx.all.js:9:1569492)
at t.<anonymous> (dx.all.js:9:1577981)
at Object.s [as onCellClick] (dx.all.js:9:1578676)
at t._trigger (dx.all.js:9:772855)
at t._handleCellClick (dx.all.js:9:781448)
at HTMLTableElement.dispatch (jquery.js:5430:27)
at elemData.handle (jquery.js:5234:28)"

Could you please assist us in resolving this issue?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

Can you please try to remove your jquery /js/devextreme/jquery.js include as Metronic already includes the required version of jQuery in plugins.bundle.js.

Regards.



Thank you very much. It solved my problem.



Hi happy,

Great to hear that. All the best with your projects!

Regards.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(