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

modal's problem on react version


Hi
when I click a button which is supposed to open a modal but it doesn't happen and got this error

the button :
<a
href='#'
className='btn btn-sm btn-light-success fw-bolder ms-2 fs-8 py-1 px-3'
data-bs-toggle='modal'
data-bs-target='#kt_modal_upgrade_plan'
>
Upgrade to Pro
</a>

the error :

Uncaught TypeError: Cannot read properties of undefined (reading 'classList')
Uncaught ReferenceError: process is not defined


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


Hi,

May I know which product and version are you using?

Regards.



HI
metronic 8
react . demo 1
Regards



Hi,

It looks like your errors are not related to the modals, do you have this problem only with #kt_modal_upgrade_plan modal or with all modals?



Modal doesn't working on the all parts of template



Do you use the latest version of Metronic?

As you can see on our preview page all modals work fine.



But for ours doesn't



Do you use the latest version of Metronic 8?



Unfortunately, we weren't able to reproduce it in the latest Metronic version.

Did you make any changes to our codebase?



I had the same issue and when I replaced package.json and yarn.lock from the below URL it got fixed. not sure what's your root cause

https://gist.github.com/carmelodevuz/40c32fa5a96d3a64c5f4be20bf44085c.


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