From c7a66861a6e8a5e33ab46611877f30cd23586c12 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 10 Mar 2009 00:31:19 +0000 Subject: [PATCH] The URL for the story was changing when the story was edited. The initial URL was based on the current asset, which is the Archive instead of the Folder. (Archive hands off to Folder in addChild). On following edits, no URL was passed, so one was built from the parent, which is the Folder. Fix this by passing in the existing URL as an hidden form param. --- lib/WebGUI/Asset/Story.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WebGUI/Asset/Story.pm b/lib/WebGUI/Asset/Story.pm index 22c811cb8..6eea89d40 100644 --- a/lib/WebGUI/Asset/Story.pm +++ b/lib/WebGUI/Asset/Story.pm @@ -333,6 +333,9 @@ sub getEditForm { $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'assetId', value => 'new' }) . WebGUI::Form::hidden($session, { name => 'class', value => $form->process('class', 'className') }); } + else { + $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'url', value => $url}); + } return $self->processTemplate($var, $archive->get('editStoryTemplateId')); }