diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 8fb328916..1fbd37f1e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.18 + - fixed #10795: Copy and edit template give error - fixed #10788: Thread rating calculate during post delete/restore - will now respect X-Forwarded-Proto header - no longer need special Apache configuration to handle SSLPROXY header diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index 23843ad28..67bf4aa21 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -874,7 +874,7 @@ sub www_editDuplicate { menuTitle => $self->get( "menuTitle" ) . " (copy)", } ); - # Make our asset use our new template + # Make the asset that originally invoked edit template use the newly created asset. if ( $self->session->form->get( "proceed" ) eq "goBackToPage" ) { if ( my $asset = WebGUI::Asset->newByUrl( $session, $form->get( "returnUrl" ) ) ) { # Find which property we should set by comparing namespaces and current values @@ -888,7 +888,11 @@ sub www_editDuplicate { # Auto-commit our revision if necessary # TODO: This needs to be handled automatically somehow... - WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session); + my $status = WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session); + ##Force the locked by tag + if ($status eq 'commit') { + $newTemplate->{_properties}{isLockedBy} = undef; + } last DEF; } }