diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d4e66e983..1a1910fe2 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -25,6 +25,7 @@ - Testing Gallery::Utility a bit more thoroughly. - fix: Photo EXIF data now gets cached correctly and sanitized for references (since JSON won't store them and they're of no use to us anyway). + - fix: No current asset when ending up on Not Found page 7.5.0 - rfe: Search Asset returns URLs diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index d148bd68f..4a2b05ca2 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,7 +1,7 @@ package WebGUI; -our $VERSION = "7.5.0"; +our $VERSION = '7.5.1'; our $STATUS = "beta"; diff --git a/lib/WebGUI/AssetTrash.pm b/lib/WebGUI/AssetTrash.pm index 2b64963fa..8785ca79f 100644 --- a/lib/WebGUI/AssetTrash.pm +++ b/lib/WebGUI/AssetTrash.pm @@ -194,7 +194,7 @@ sub purge { # clean up version tag if empty my $versionTag = WebGUI::VersionTag->new($session, $tagId); - if ($versionTag->getAssetCount == 0) { + if ($versionTag && $versionTag->getAssetCount == 0) { $versionTag->rollback; } return 1; diff --git a/lib/WebGUI/Content/NotFound.pm b/lib/WebGUI/Content/NotFound.pm index b759832cf..75d1dc6a0 100644 --- a/lib/WebGUI/Content/NotFound.pm +++ b/lib/WebGUI/Content/NotFound.pm @@ -50,7 +50,8 @@ sub handler { my $output = ""; my $notFound = WebGUI::Asset->getNotFound($session); if (defined $notFound) { - $output = eval { $notFound->www_view }; + $session->asset($notFound); + $output = eval { $notFound->www_view }; } else { $session->errorHandler->error("The notFound page could not be instanciated!");