[Rt-commit] rt branch, 4.4/quicksearch-upgrade-warning, created. rt-4.4.1-215-gf279cd2

Shawn Moore shawn at bestpractical.com
Fri Dec 30 18:00:08 EST 2016


The branch, 4.4/quicksearch-upgrade-warning has been created
        at  f279cd2e3c63bfa6edaca92c91f4d05252d15a7e (commit)

- Log -----------------------------------------------------------------
commit f279cd2e3c63bfa6edaca92c91f4d05252d15a7e
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.
    
    Fies: 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