Wizard creates topic with no post

Environment

Discourse Version: 2.8.0.beta2

Plugin Commit: 247f7ca466d52b4f8b418f8ef1de06ae08cc362f

Steps to Reproduce

I believe this is to do with trust levels, I haven’t been able to find this bug triggered by a non-level 0 user, or not triggered by a level 0 user.

  1. As a user with trust level 0, try and fill a wizard which has a Create Topic action
  2. Check the submitted post

The post will display an error. Appending .json to get the API response shows this:


{
  "post_stream":{"posts":[],"stream":[]}
  ...
}

The reply counter when threads are listed also shows “-1”.

Example

The post is in a restricted category (and I can’t move it somewhere unrestricted and just unlist it because viewing the post errors). The wizard is available at Rank application but requires login.

Logs

TypeError: m is undefined
setupController https://forums.projectcitybuild.com/assets/application-1e90a6a161639020e931e510ec90482b2478d148f6e2529319fb5f9eded26867.js:1
setup https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
s https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
routeEnteredOrUpdated https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
setupContexts https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
finalizeTransition https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
promise https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
b https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_ https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
invoke https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
flush https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
flush https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_end https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
end https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_run https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
run https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
c https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
success https://forums.projectcitybuild.com/assets/application-1e90a6a161639020e931e510ec90482b2478d148f6e2529319fb5f9eded26867.js:1
u https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
fireWith https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
T https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
n https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
application-1e90a6a161639020e931e510ec90482b2478d148f6e2529319fb5f9eded26867.js:1:2601265
error https://forums.projectcitybuild.com/assets/application-1e90a6a161639020e931e510ec90482b2478d148f6e2529319fb5f9eded26867.js:1
O https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
triggerEvent https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
trigger https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
finalizeTransition https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
promise https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
b https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_ https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
invoke https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
flush https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
flush https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_end https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
end https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
_run https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
run https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
c https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:30
success https://forums.projectcitybuild.com/assets/application-1e90a6a161639020e931e510ec90482b2478d148f6e2529319fb5f9eded26867.js:1
u https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
fireWith https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
T https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22
n https://forums.projectcitybuild.com/assets/vendor-d0c9e6c505a84fa8f3e94def4d2b21ca24b3da8a8d3d2ae26f90b26f3ea9fa94.js:22

Just after I submitted this I was able to figure out why post creation fails: the create topic action’s post builder contains a poll, but the minimum trust level to create a poll in the settings is level 1. I’ve now changed this and will see if this happens again.

However, I’d still consider this bug unresolved since it would be better if the plugin in some way errored rather than creating empty topics that break when viewed.

1 Like

Can you try creating the topic using discourse’s composer with the same poll data?

If I increase the trust level required to create a poll to level 1, and use a level 0 account to post a poll, I get:

It does appear the trigger for this bug was the trust level of polls. Now we’ve set it to level 0 minimum we haven’t had any more of these postless topics.

1 Like

Thanks. Good to know you were able to fix the issue.

This topic was automatically closed after 3 days. New replies are no longer allowed.