Problems with front-end thickbox code

Hi,
I’m adding a thickbox with the core WP script, essentially just like this: https://codex.wordpress.org/ThickBox

It all works properly, except when I click the link to activate the modal/thickbox, an error is thrown:

jquery.js?ver=1.12.4-wp:2 Uncaught Error: Syntax error, unrecognized expression: #TB_inline?&width=550&height=450&inlineId=exactdn-cname-details-3746
    at Function.ea.error (jquery.js?ver=1.12.4-wp:2)
    at ea.tokenize (jquery.js?ver=1.12.4-wp:2)
    at ea.select (jquery.js?ver=1.12.4-wp:2)
    at Function.ea (jquery.js?ver=1.12.4-wp:2)
    at Function.a.find (jquery-migrate.min.js?ver=1.4.1:2)
    at n.fn.init.find (jquery.js?ver=1.12.4-wp:2)
    at n.fn.init.a.fn.find (jquery-migrate.min.js?ver=1.4.1:2)
    at a.fn.init.n.fn.init (jquery.js?ver=1.12.4-wp:2)
    at new a.fn.init (jquery-migrate.min.js?ver=1.4.1:2)
    at n (jquery.js?ver=1.12.4-wp:2)

I deactivated all plugins (except the one creating the thickbox link) and the issue persisted. Swapped to Twenty Seventeen, and the error is gone. So something in Moesia must be triggering an error, but I can’t seem to find it.

The implementation is behind a login, but it looks something like this:

<a href="#TB_inline?&amp;width=550&amp;height=450&amp;inlineId=exactdn-cname-details-3747" title="Add Custom Hostname" class="thickbox"><i class="fa fa-edit" style="float:right"></i></a>

and the target is like so:
<div id="exactdn-cname-details-3747" style="display:none"><div><p>Custom hostnames can be used instead of the *.exactdn.com hostname. To point a hostname to our servers, create a CNAME record to <strong>xyz.b-cdn.net</strong>.</p><p></p><div class="exactdn-cname-error"></div><div class="exactdn-cname-success"></div><form id="exactdn-cname-add-3747" class="exactdn-cname-add"><input type="text" id="exactdn-custom-cname-3747" placeholder="cdn.mysite.com"><input type="submit" class="exactdn-submit" value="Add"></form><p><strong><em>*Please disable Easy IO on your site before adding a custom hostname.</em></strong> Once the custom hostname is active, simply re-enable Easy IO and your site will automatically use the new hostname.</p></div></div>

Hello there,

Thank you for contacting us.

Do you have a link to the related page to share here, so I can take a look?

Regards,
Kharis
aThemes Support

As I mentioned, that particular page deals with a UI for logged-in users, but I’ll see if I can setup a temp page that replicates the issue where you can see it.

Okay, I copied one of the cases to a new page: https://dev.shanebishop.net/ewww/test-thickbox/

The thickbox works as expected, but the error still occurs in the dev tools console.

Hello there,

As checked, everything seems to be appearing fine as seen on the below screencast: https://cldup.com/cpynv4DS2M.gif.

Do you have a screenshot or screen recording to point me the issue you’re getting?

Regards,
Kharis
aThemes Support

Indeed, the thickbox DOES work, but when Moesia Pro is active, there is a call to something within jQuery that throws an error:

So functionally, it seems alright, but it makes me quite nervous as to what might happen down the road with this uncaught error.

Hello there,

Thank you for updating me.

To check whether Mosia Pro is causing you this issue, please try temporarily switching to one of default WordPress themes like Twenty Twenty; and run your test.

Let me know how it goes.

Regards,
Kharis
aThemes Support

From my original post: