www_modify does not work well with error checking on
forms.
www_save usually ends something like
if ($errormsg) {
$self->www_modify($errormsg);
} else {
$self->save();
#$self->md_redirect("http://$GA{basename}/index.pl?iid=".$self->parent_id);
$self->md_redirect($url);
}
The commented out line is metadot.com's, presumably so
one can edit from a category or the detail. (I use it
a little bit harder, but in the same vain).
The trouble comes in if you do validation on a Gizmo
form and have an error message to display. You go back
into the form (displaying the error message) for the
user to fix things.
... but second time around $url points not to where you
really started, but to the previous modify
In Gizmo
In sub www_modify {
my $target = $SESSION->{referer};
and later
<input type='hidden' name='target' value='$target'>
-----------
it seems to me the assignment line should be
my $target = $FORM{$target} || $SESSION->{referer};
Logged In: YES
user_id=105143
Actaully the fix would be better as
my $target =
defined($FORM{$target})?$FORM{$target}:$SESSION->{referer};