Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Many erros in Metronic Laravel 8.3.2


Hello everyone,

First of all, when authenticating, the validations are duplicated and the scripts run twice.
Then, the following errors are always present:


scripts.bundle.js:7903 Uncaught TypeError: searchObject.on is not a function
at Object.init (scripts.bundle.js:7903:26)
at HTMLDocument.<anonymous> (scripts.bundle.js:7925:20)
at forwardEvent (livewire.js?id=02b08710:9370:14)
at HTMLDocument.<anonymous> (livewire.js?id=02b08710:9367:56)
at fireEventForOtherLibrariesToHookInto (livewire.js?id=02b08710:7997:14)
at livewire.js?id=02b08710:7974:7




Uncaught Error: You cannot have multiple Roots on the same DOM node




Uncaught TypeError: stepperObj.on is not a function
at initStepper (create-app.js:24:14)
at Object.init (create-app.js:317:4)
at HTMLDocument.<anonymous> (create-app.js:326:17)
at forwardEvent (livewire.js?id=02b08710:9370:14)
at HTMLDocument.<anonymous> (livewire.js?id=02b08710:9367:56)
at fireEventForOtherLibrariesToHookInto (livewire.js?id=02b08710:7997:14)
at livewire.js?id=02b08710:7974:7


users-search.js:66 Uncaught TypeError: searchObject.on is not a function
at Object.init (users-search.js:66:26)
at HTMLDocument.<anonymous> (users-search.js:76:23)
at forwardEvent (livewire.js?id=02b08710:9370:14)
at HTMLDocument.<anonymous> (livewire.js?id=02b08710:9367:56)
at fireEventForOtherLibrariesToHookInto (livewire.js?id=02b08710:7997:14)
at livewire.js?id=02b08710:7974:7



Thanks!

Samuel Olavo


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 (4)


I have same issue but I found the solution happy
(Tested on Metronic version 8.3.2)
The problem on the file scripts.bundle.js

onDOMContentLoaded: function (e) {
"loading" === document.readyState ? (document.addEventListener("DOMContentLoaded", e), document.addEventListener("livewire:navigated", e)) : e()
},


If condition true will called twice via livewire on laravel version and DOMContentLoaded. if you don't use livewire remove it from statement, it works for me without any problems.


onDOMContentLoaded: function (e) {
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded", e) : e()
},



I do it, but i have the same errors:


scripts.bundle.js:7903 Uncaught TypeError: searchObject.on is not a function
at Object.init (scripts.bundle.js:7903:26)
at HTMLDocument.<anonymous> (scripts.bundle.js:7925:20)
at forwardEvent (livewire.js?id=02b08710:9370:14)
at HTMLDocument.<anonymous> (livewire.js?id=02b08710:9367:56)
at fireEventForOtherLibrariesToHookInto (livewire.js?id=02b08710:7997:14)
at livewire.js?id=02b08710:7974:7
Root.ts:422 Uncaught Error: You cannot have multiple Roots on the same DOM node
Root.ts:422 Uncaught Error: You cannot have multiple Roots on the same DOM node
Root.ts:1980 Uncaught TypeError: Failed to execute "getComputedStyle" on "Window": parameter 1 is not of type "Element".
Root.ts:1980 Uncaught TypeError: Failed to execute "getComputedStyle" on "Window": parameter 1 is not of type "Element".



Root.ts:422 Uncaught Error: You cannot have multiple Roots on the same DOM node



Root.ts:1980 Uncaught TypeError: Failed to execute "getComputedStyle" on "Window": parameter 1 is not of type "Element".



Hi Samuel Olavo

https://gist.github.com/faizalmy/9a12cc372bcc3c8b8e5fa9fb23d82e9c

Could you please use this workaround? Replace the existing file, then rebuild assets using "npm run dev"

resources/_keenthemes/src/js/custom/utilities/modals/users-search.js

Thanks



Hello everyone,

The main part of the problem is in the scripts.bundle.js file.

I tested using the file from version 8.2.6, and everything worked perfectly after replacing the current file with that one.

I know this isn’t a real solution, but it should help narrow down the issue, which has been present since version 8.3.0.


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  :(