Create topic that creates an event with official Discourse Events plugin

I’m having some trouble and wondering where I’m going wrong. I am creating a custom wizard for a person to fill out which then generates a topic with a preformatted Discourse Events entry.

I’ve created fields for the date, start time, end time, name, and url. I used the Post Builder to enter this information, like this:

[event start="w{step_1_field_1} w{step_1_field_2}" status="public" name="w{step_1_field_7} w{step_1_field_1}" url="w{step_1_field_4}" timezone="America/New_York" end="w{step_1_field_1} w{step_1_field_5}" allowedGroups="trust_level_0" reminders="bumpTopic.2.hours,notification.15.minutes"] [/event]

But, when the user fills out the form, the topic is not created and there’s a banner at the top of the wizard that says <!DOCTYPE html>.

After a while, I checked again in the category, and it indicated there were new topics, but they didn’t appear, they’re just…not there. I checked the wizard submissions, and one of my attempts was listed, then it disappeared, I tried two more times, the submissions didn’t appear; then tried a fourth time and that submission did appear.

Not sure where I’m going wrong! The logs section is completely empty, too.

Sorry to hear you are having trouble, Jen.

Are you able to make a simpler wizard work?

I’m not sure - this is a form to make it easier for office staff to announce a regular meeting without having to go through the process of creating an event each time, so I’m not sure how to make it simpler exactly.

It is a really good idea - and something I’ve been meaning to do myself!

What I meant was can you make a simple test wizard work nicely? I just want to understand if the whole plugin is working well before digging into the wizard itself.

Also, would you mind posting the .json for the wizard as it is? I’ll then give it a test run in this site.

Hi Jen - did you get anywhere with this?

I didn’t, unfortunately.

I use custom wizard forms elsewhere on the site with no issue - it seems that trying to use it with Discourse Events is the issue.

What I’m noticing in the json export of the form is that [ is being replaced by \u003c and ] is being replaced by \u003e.

What it should output to the post:
[event start="w{step_1_field_1} w{step_1_field_2}" status="public" name="w{step_1_field_7} w{step_1_field_1}" url="w{step_1_field_4}" timezone="America/New_York" end="w{step_1_field_1} w{step_1_field_5}" allowedGroups="trust_level_0" reminders="bumpTopic.2.hours,notification.15.minutes"] [/event]

Actual output according to the json export:
"post_template":"\u003cevent start=\"w{step_1_field_1} w{step_1_field_2}\" status=\"public\" name=\"w{step_1_field_7} w{step_1_field_1}\" url=\"w{step_1_field_4}\" timezone=\"America/New_York\" end=\"w{step_1_field_1} w{step_1_field_5}\" allowedGroups=\"trust_level_0\" reminders=\"bumpTopic.2.hours,notification.15.minutes\"\u003e\n\u003c/event\u003e"

How frustrating! It does look like a bug; would you mind if I shift your posts to the topic to open it up to others?

Sure, that’d be fine.

I exported the form and changed u003e and u003c to the correct unicode; imported it back in to the Custom Wizard and unfortunately that didn’t work.

Hey guys, here’s an example of how to create an Discourse Events event with the Custom Wizard plugin

Hi, so sorry but this video is not playing for me - all of the buttons are grayed out and trying to copy the video address and running it in new tab gives me an error.

Also tried to extract just the address to the .mp4 but that didn’t seem to work either.

What browser are you using Jen? Here’s a direct link.

https://www.loom.com/share/005f0f24aebf46ea91451deecf95c21a?sid=dfa11bfc-92dd-4226-a24e-d10f5aaf0105