Custom Wizard composer causes TypeError and cannot proceed

Hi Pavilion Team!

Recently, whenever someone fills out the Wizard and gets to a step where there is a Composer, an error pops up and it doesn’t allow the user to go to the next step:

We’re currently subscribed on Wizard version 2.6.8. Was just wondering if this is already fixed in 2.6.9? Looking to do an update next week.


Hey Tim, we’re not able to reproduce this issue with the latest version of the plugin on either the stable or main branches of Discourse. Could you confirm which specific commit of Discourse and of the plugin you’re running?

Hey @angus ,

Thanks for responding!

We’re running stable on prod, still on version 3.2.1. Our plugin is on this commit: FIX: various fixes for realtime validations feature · paviliondev/discourse-custom-wizard@0d0fb83 · GitHub

but our staging is on the latest version for both Discourse and the plugin, and the issue persists.

I created a test wizard for you to see the issue better: MongoDB Developer Community Forums

Let me know if there’s any additional info I can provide!


Thanks Tim. I’ve recreated that test in a controlled environment using 3.2.1 and the version of the plugin you’re on and confirmed that the issue doesn’t occur:

There must be something blocking the execution of the autocomplete script on your site. I do see a fair few non-discourse client-side exceptions on your site. Not sure if they’re contributing to the script not executing correctly for some reason.

Nevertheless, I’m going to add in more protections for this kind of eventuality to the plugin itself, so at least the exception won’t occur and the wizard can still be used.

1 Like

@hyphalos Just to confirm, the issue is that the jQuery autocomplete function in core Discourse is not being loaded on your site. You can see this if you type this into a browser console on that test page (or any page on your Discourse):


You’ll see it returns undefined on your community. It just return a function, as you can see when you enter the same on or this site.

There could be a few reasons why that function is not being loaded properly. While I can add protections for that eventuality in the plugin, it is worth looking into this issue on your end as it will be effecting core Discourse too, not just the Custom Wizard plugin. See further

1 Like

@hyphalos In addition to the above, I’ve made a change in that handling so that the wizard composer uses the same logic in core Discourse. This reduces the number of variables in play

This changed is in 2.6.10, i.e. the latest commit. The issue with loading the JQuery autocomplete function on your instance should still be investigated. Let us know how you go with that.


Thanks @angus ! Didn’t realise it was something specifically to our site. I appreciate your help and for updating custom wizard for this! Legend :fire: