diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 54963f48e..e5fea5b13 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -2,6 +2,7 @@ - Bugfixes on dashboard to fix template errors. - Bug fixes to make WebGUI work with the WRE demo system. - Fixed a typo in the activities in the config file. + - fixed a bug that caused threadId's to be empty in new posts 6.99.0 - Added a workflow system. diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 69f986948..55697e195 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -323,7 +323,7 @@ "WebGUI::VersionTag" : ["WebGUI::Workflow::Activity::CommitVersionTag", "WebGUI::Workflow::Activity::RollbackVersionTag", "WebGUI::Workflow::Activity::TrashVersionTag", "WebGUI::Workflow::Activity::CreateCronJob", "WebGUI::Workflow::Activity::UnlockVersionTag", "WebGUI::Workflow::Activity::NotifyAboutVersionTag", - "WebGUI::Workflow::Activity::RequestApprovalForVersionTag", "WebGUI::Workflow::Activity::ExportVersionTagAsHtml"] + "WebGUI::Workflow::Activity::RequestApprovalForVersionTag", "WebGUI::Workflow::Activity::ExportVersionTagToHtml"] }, # Enter the graphing plugins that you want to enable for your site. diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 2764d8135..0da0caede 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1533,7 +1533,9 @@ sub processPropertiesFromFormPost { foreach my $definition (@{$self->definition($self->session)}) { foreach my $property (keys %{$definition->{properties}}) { if ($definition->{properties}{$property}{noFormPost}) { - $data{$property} = $definition->{properties}{$property}{defaultValue} if $self->session->form->process("assetId") eq "new"; + if ($self->session->form->process("assetId") eq "new" && $self->get($property) eq "") { + $data{$property} = $definition->{properties}{$property}{defaultValue}; + } next; } my %params = %{$definition->{properties}{$property}}; diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index d25d67efe..9f95456c7 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -71,7 +71,7 @@ sub addRevision { my $now = time(); if ($threadId eq "") { # new post if ($newSelf->getParent->get("className") eq "WebGUI::Asset::Wobject::Collaboration") { - $newSelf->update({threadId=>$newSelf->getId}, dateSubmitted=>$now); + $newSelf->update({threadId=>$newSelf->getId, dateSubmitted=>$now}); } else { $newSelf->update({threadId=>$newSelf->getParent->get("threadId"), dateSubmitted=>$now}); }