The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

$(...).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="
<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="
<!-- 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(