template editor bugfixes for edit_stpl locations
debug bugfix for stpl location
unit tests for tpl bugs up
tpl driver foreach bugfix