# 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:** 1

<div class="post-metadata">

**Author:** ![Marie\_Pelletier](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marie_pelletier/32/241520_2.png) [@Marie\_Pelletier](https://meta.discourse.org/u/Marie_Pelletier)\
**Post date:** [August 2, 2022, 6:14pm UTC](https://meta.discourse.org/t/custom-theme-modals-no-longer-open/234861/1 "2022-08-02T18:14:20Z")

</div>

We have a custom theme for discourse that we have not modified in months. Recently, the modals have stopped opening and we get an error of:

```plaintext
Uncaught TypeError: $(...).modal is not a function
    didInsertElement d-modal-body.js:31

```

Removing the custom theme fixes it.

Our theme does not specifically modify anything to do with modals, as far as I can tell. The latest changes done by Discourse to the file that is throwing an error is here:  
[https://github.com/discourse/discourse/commit/321f0a63c1112919a87527f2de4a0ca226303be9](https://github.com/discourse/discourse/commit/321f0a63c1112919a87527f2de4a0ca226303be9)  
But it doesn’t look like something that would have dire consequences to custom themes.

Once again, nothing has changed on our theme, so there is something in our theme that is not compatible with recent changes in Discourse.

Our theme code is stored here: [GitHub - RebusFoundation/discourse-rebus-theme · GitHub](https://github.com/RebusFoundation/discourse-rebus-theme)

Does anyone have a clue of what could cause that problem?

---

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