# Custom theme modals no longer open

**URL:** <https://meta.discourse.org/t/custom-theme-modals-no-longer-open/234861>\
**Category:** Development\
**Created:** [August 2, 2022, 6:14pm UTC](https://meta.discourse.org/t/custom-theme-modals-no-longer-open/234861 "2022-08-02T18:14:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)\
**Post date:** [August 4, 2022, 1:23am UTC](https://meta.discourse.org/t/custom-theme-modals-no-longer-open/234861/4 "2022-08-04T01:23:14Z")

</div>

Looking at your site, I’m seeing an error that precedes the one for the modal. I’m thinking the modal issue _might_ be a side effect of this first error that shows up in the console:

```plaintext
mc-validate.js:195 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.getAjaxSubmitUrl (mc-validate.js:195:14)
    at mc-validate.js:351:11
    at mc-validate.js:373:2

```

The `mc-validate.js` script is introduced in your theme [here](https://github.com/RebusFoundation/discourse-rebus-theme/blob/f97cd0c24d6d6de62a2ae5986b716477082bafc9/common/head_tag.html#L242).

It might be worth trying to temporarily remove that script to see if it fixes the modal issue. If it does, you’ll likely need to do some digging to understand why the third-party script is failing.

---

_[View the full topic](https://meta.discourse.org/t/custom-theme-modals-no-longer-open/234861)._
