JS plugin bundle conflict with older JS

Hi, is there any way we can avoid the conflict? I am upgrading my old laravel website's UI using metronic but a lot of functions are disabled when I use the plugin bundle. Dont know where to start

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

Dont know where to start because no error on console.

Hi Jasri,

Does the old laravel is a Metronic Laravel or your own custom Laravel? Could you please try to put the plugins.bundle.js file at the top of other JS files?

Thanks

Old laravel is custom not Metronic.

Suprisingly putting the JS below the bundle sorts some of the functionalities.

But some still not able to function as usual for example profile photo upload/crop, after selecting the photos, there should be a preview/crop screen, but nothing appear, no error. However I find the photo did get uploaded to the server but reference in database. Once i commented on the plugin.bundle, it works as usual.

I am still looking around to see what other that isnt working, will update with you guys.

EDIT: i take back my words, once i put old JS below the bundle, metronic stepper button no longer works

Hi,

Sorry for the late reply. Can you try to use the document-ready handler to run your code:

// On document ready
KTUtil.onDOMContentLoaded(function() {
// my code goes here
});

Right, when you access a 3rd-party plugin it should be loaded and available in your context. So using onDOMContentLoaded will solve most of the issues. If you need any further help please provide us with your test link so we can debug your page online. Otherwise, we can't predict the issue without looking at your code since the issue is related to your custom code, not a general theme issue.

Regards.

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