[Rt-commit] rt branch, 4.4/quicksearch-upgrade-warning, created. rt-4.4.1-215-g3c0fe55
Shawn Moore
shawn at bestpractical.com
Wed Jan 4 17:32:12 EST 2017
The branch, 4.4/quicksearch-upgrade-warning has been created
at 3c0fe552c0a11cd205e76636a396a150040dce30 (commit)
- Log -----------------------------------------------------------------
commit 3c0fe552c0a11cd205e76636a396a150040dce30
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Fri Dec 30 22:58:34 2016 +0000
Log when Quicksearch wasn't replaced with QueueList
We've seen several reports of users getting an "Invalid portlet QueueList"
error message, which generally means missing replacing Quicksearch with
QueueList in HomepageComponents. Detect such a situation and suggest the
fix.
Fixes: I#32475
diff --git a/share/html/Dashboards/Elements/ShowPortlet/component b/share/html/Dashboards/Elements/ShowPortlet/component
index cead87f..67ede20 100644
--- a/share/html/Dashboards/Elements/ShowPortlet/component
+++ b/share/html/Dashboards/Elements/ShowPortlet/component
@@ -60,6 +60,10 @@ my $allowed = grep { $_ eq $path } @{RT->Config->Get('HomepageComponents')};
</%init>
% if (!$allowed) {
% $m->out( $m->interp->apply_escapes( loc("Invalid portlet [_1]", $path), "h" ) );
+% RT->Logger->info("Invalid portlet $path found on dashboard #" . $Dashboard->Id);
+% if ($path eq 'QueueList' && grep { $_ eq 'Quicksearch' } @{RT->Config->Get('HomepageComponents')}) {
+% RT->Logger->warning("You may need to replace the component 'Quicksearch' in the HomepageComponents config with 'QueueList'. See the UPGRADING-4.4 document.");
+% }
% } else {
% $m->comp($full_path, HasResults => $HasResults);
% }
diff --git a/share/html/Elements/MyRT b/share/html/Elements/MyRT
index 7f54a04..74be826 100644
--- a/share/html/Elements/MyRT
+++ b/share/html/Elements/MyRT
@@ -91,6 +91,10 @@ my $show_cb = sub {
if ( $type eq 'component' ) {
if (!$allowed_components{$name}) {
$m->out( $m->interp->apply_escapes( loc("Invalid portlet [_1]", $name), "h" ) );
+ RT->Logger->info("Invalid portlet $name found on user " . $user->Name . "'s homepage");
+ if ($name eq 'QueueList' && $allowed_components{Quicksearch}) {
+ RT->Logger->warning("You may need to replace the component 'Quicksearch' in the HomepageComponents config with 'QueueList'. See the UPGRADING-4.4 document.");
+ }
}
else {
$m->comp( $name, %{ $entry->{arguments} || {} } );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list