Best method to detect if event is successful?
This is an open discussion with 3 replies, filed under General.
Search
Doesn't events return something in xml, like:
/data/:EventName:/@result
or
/data/events/member-login-info/@logged-in
easy can be checked via xslt?
I think Pat means within PHP.
The EventFinalSaveFilter
would be your best bet to try out. the EventPostSaveFilter
fires when an event saves to a section, so if your event doesn't do this, then it may not fire.
I've not hooked into event delegates myself yet, but the final save one looks right.
@moma: XML is not returned when redirecting
@designermonkey: Thanks. I'll look into that
Create an account or sign in to comment.
I want to run some code if an event is successful. Should I be using EventPostSaveFilter? Does this only get fired on success?
Currently, I use the redirect functionality to append
?success
and check for the GET variable (same as the Symphony admin interface). Something annoying is that if the user refreshes, they get are running the success code again. A work around I've implemented is to use Javascript and the HTML5 History API to replace the URL immediately on page load.