fixed not found page problem
This commit is contained in:
parent
5af6eaa085
commit
8dac9d9daa
3 changed files with 21 additions and 14 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
6.7.0
|
6.7.0
|
||||||
|
- Fixed a potential problem where editing a page under rare very rare
|
||||||
|
conditions could destroy the not found page.
|
||||||
- Added the ability to override the UI Level of any field in the edit form of
|
- Added the ability to override the UI Level of any field in the edit form of
|
||||||
any asset in the WebGUI config file.
|
any asset in the WebGUI config file.
|
||||||
- Translation providers can now add languageAbbreviation and locale
|
- Translation providers can now add languageAbbreviation and locale
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ sub page {
|
||||||
my $output = _processOperations();
|
my $output = _processOperations();
|
||||||
if ($output eq "") {
|
if ($output eq "") {
|
||||||
my $asset = WebGUI::Asset->newByUrl($assetUrl);
|
my $asset = WebGUI::Asset->newByUrl($assetUrl);
|
||||||
|
if (defined $asset) {
|
||||||
$session{asset} = $asset;
|
$session{asset} = $asset;
|
||||||
my $method = "view";
|
my $method = "view";
|
||||||
if (exists $session{form}{func}) {
|
if (exists $session{form}{func}) {
|
||||||
|
|
@ -104,6 +105,9 @@ sub page {
|
||||||
$output = $asset->www_view;
|
$output = $asset->www_view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$output = WebGUI::Asset->getNotFound->www_view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WebGUI::Affiliate::grabReferral(); # process affilliate tracking request
|
WebGUI::Affiliate::grabReferral(); # process affilliate tracking request
|
||||||
if (WebGUI::HTTP::isRedirect() && !$useExistingSession) {
|
if (WebGUI::HTTP::isRedirect() && !$useExistingSession) {
|
||||||
|
|
|
||||||
|
|
@ -1056,7 +1056,8 @@ sub newByUrl {
|
||||||
if ($id ne "" || $class ne "") {
|
if ($id ne "" || $class ne "") {
|
||||||
return WebGUI::Asset->new($id, $class, $version);
|
return WebGUI::Asset->new($id, $class, $version);
|
||||||
} else {
|
} else {
|
||||||
return WebGUI::Asset->getNotFound;
|
WebGUI::ErrorHandler::warn("The URL $url was requested, but does not exist in your asset tree.");
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return WebGUI::Asset->getDefault;
|
return WebGUI::Asset->getDefault;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue