diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 765138e25..d1785c000 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -25,6 +25,7 @@ submissions. - Added some missing international entries that caused problems accessing some of the online help. + - Fixed a bug with Article override template. diff --git a/lib/WebGUI/Wobject/Article.pm b/lib/WebGUI/Wobject/Article.pm index f6cb74929..55848a720 100644 --- a/lib/WebGUI/Wobject/Article.pm +++ b/lib/WebGUI/Wobject/Article.pm @@ -130,7 +130,7 @@ sub www_view { if ($_[0]->get("convertCarriageReturns")) { $var{description} =~ s/\n/\\n/g; } - $var{"new.template"} = WebGUI::URL::page("wid=".$_[0]->get("wobjectId")."&func=view")."&templateId="; + $var{"new.template"} = WebGUI::URL::page("wid=".$_[0]->get("wobjectId")."&func=view")."&overrideTemplateId="; $var{"description.full"} = $var{description}; $var{"description.full"} =~ s/\^\-\;//g; $var{"description.first.100words"} = $var{"description.full"}; @@ -183,8 +183,8 @@ sub www_view { $var{"post.label"} = WebGUI::International::get(24,$_[0]->get("namespace")); } my $templateId = $_[0]->getValue("templateId"); - if ($session{form}{func} eq "editSave") { - $templateId = $_[0]->get("templateId"); + if ($session{form}{overrideTemplateId} ne "") { + $templateId = $session{form}{overrideTemplateId}; } if ($session{form}{forumOp}) { unless ($!= $_[0]->get("wobjectId")) {