Event scripts are not triggered but able to manually run it

I have created some event scripts using the web interface editor. After I have created these event scripts, I am able to manually run the script successfully doing what is intended through rest/system/script/{scriptid}. However, when I think I am triggering the event that this script is supposed to be triggered by (i.e. using ‘Try it out’) through the swagger api page, the script doesn’t appear to be running at all. The logs also show no events being triggered.

Is there something/steps I am missing from creating the event script to getting it triggered by rest api calls? Do I need to register it? Or is event triggering disabled when done through swagger or web interface interacitons? Thanks for your help!

I just created a script for db.todo.get.pre_process and it worked as expected. Which events are you writing scripts for?

I am writing a script for the /user/register api call. I ended up getting it to work by writing a script for user.register.post.post_process and it’s cool! But noticed a few odd things.

  1. user.create never gets triggered, contrary to what it says in the swagger docs
  2. event.request.body.email returned ‘undefined’ when logged. I ended up accessing the email through the response and this worked fine.

confirmed user.create not triggered.

event.request.body is a string not an object which has got to be a bug.

We should be able to get these fixed quickly.

event.request.body problem is fixed on github and will be in the 1.8.1 release early next week.

Still looking into user.create problem.

user.create and other user events have been fixed and will be in 1.8.1.

This change does not affect pre_process and post_process user events which were working properly.