I can see the update in the database so its working and sometimes it goes though just fine but most of the time the browser just hangs and then gets a 500 error. The fact that sometimes it works fine and that I can see the updates in the database has me boggled.
Ok so I created a test were it created new records instead of just changing info and it was creating 5 new records so it is looping. I am using onAfterWrite here and not onBeforeWrite.
So how do I update new information without creating the loop? I tried all sorts of things but always got the loop. So I upon saving the current page updating information on another page as well is what I am trying to accomplish.