diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9548bc4fe..f78481d63 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -14,6 +14,9 @@ - fix: Unable to upload new file to update contents of file asset (Martin Kamerbeek /Oqapi) http://www.plainblack.com/bugs/tracker/unable-to-upload-new-file-to-update-contents-of-file-asset + - fix: Issue calling shortcut - incorrect template (Martin Kamerbeek / Oqapi) + http://www.plainblack.com/bugs/tracker/issue-calling-shortcut---incorrect-template + 7.3.15 - Added more documentation to WebGUI.pm diff --git a/lib/WebGUI/Asset/Shortcut.pm b/lib/WebGUI/Asset/Shortcut.pm index edc489599..859dc3774 100644 --- a/lib/WebGUI/Asset/Shortcut.pm +++ b/lib/WebGUI/Asset/Shortcut.pm @@ -659,7 +659,13 @@ sub view { if ($self->get("shortcutToAssetId") eq $self->get("parentId")) { $content = $i18n->get("Displaying this shortcut would cause a feedback loop"); } else { + # Make sure the www_view method won't be skipped b/c the asset is cached. + $shortcut->purgeCache(); + $content = $shortcut->view; + + # Make sure the overrides are not cached by the original asset. + $shortcut->purgeCache(); } my %var = ( @@ -878,6 +884,10 @@ sub www_view { return $check if defined $check; my $shortcut = $self->getShortcut; $self->prepareView; + + # Make sure the www_view method won't be skipped b/c the asset is cached. + $shortcut->purgeCache(); + if ($shortcut->get("className") =~ m/Asset::Wobject/) { $self->session->http->setLastModified($self->getContentLastModified); $self->session->http->sendHeader; @@ -889,7 +899,11 @@ sub www_view { $self->session->output->print($foot, 1); return "chunked"; } - return $shortcut->www_view; + my $output = $shortcut->www_view; + + # Make sure the overrides are not cached by the original asset. + $shortcut->purgeCache(); + return $output; } 1;