Seesm like you need a version parameter somewhere, look at the ezwebin code ( the fronoffice editing extension added to 3.9, or the Website Interface as we call it ).
It's weird, because i kept all parameters from the orginals edit.tpl , So i don't think it lacks a parameter. To avoid the problem i want to open the preview in a new window so the user won"t have to go back to continue editing.