Details
Description
If you submit a new Event Listener without specifying an event, instead of displaying a validation error, confluence will throw a null pointer exception behind the scenes.
After that, no event listeners will be visible in the list (even previously created valid event listeners), and it will be impossible to add new visible ones.
The stack trace thrown is in the attached log. The com.onresolve.scriptrunner.runner.rest.confluence.ListenersRestEndpoint class is responsible for this.
Workaround
To fix this, you can find and delete any events listeners that don't have a list of events defined. Running the following in the script console should take care of that.
import com.onresolve.scriptrunner.confluence.ConfluenceEventListener import com.onresolve.scriptrunner.runner.util.AOPropertyPersister def handlers = AOPropertyPersister.loadList(ConfluenceEventListener.AO_PROPERTY_KEY) handlers.removeAll { ! it["events"] } AOPropertyPersister.save(handlers, ConfluenceEventListener.AO_PROPERTY_KEY)