Am 16.09.2014 um 05:13 schrieb Carlos Ramos: > Hello, > > I'm getting the following warning on my Apache error log every time I > load pretty much every RT page and I would like to get rid of it: > > [warning]: Failed to load dashboard 235: Failed to load dashboard 235: > Couldn't find row (/opt/rt4/share/html/Elements/Tabs:497) > > I guess some dashboard was deleted and it's somehow still referenced but > not showing up in the UI. ¿How can I manually delete this reference? > > Thanks. > > -- > Carlos Ramos
Attached a simple Perl script I use. The pod also notes the bug report for this. Chris
#!/usr/bin/env perl use 5.10.1; use strict; use warnings; ### after: use lib qw(@RT_LIB_PATH@); use lib qw(/opt/rt4/local/lib /opt/rt4/lib); use RT; RT->LoadConfig; RT->Init; $| = 1; my %opts; use Getopt::Long; GetOptions( \%opts, "help|h", "id=i", ); $opts{help} = 1 unless $opts{id}; if ($opts{help}) { use Pod::Usage; print Pod::Usage::pod2usage(-verbose => 2); exit; } my $Users = RT::Users->new(RT->SystemUser); $Users->FindAllRows; while (my $User = $Users->Next) { my $dashboard_pref = $User->Preferences('DashboardsInMenu'); next unless $dashboard_pref; my $dashboards = $dashboard_pref->{dashboards} || []; next unless grep { $opts{id} == $_ } @$dashboards; print sprintf "User %s has Dashboard %d in DashboardsInMenu Preference!\n", $User->Name, $opts{id}; } =head1 NAME rt-find-dashboardsinmenu - find users with a dashboard in DashboardsInMenu =head1 SYNOPSIS rt-find-dashboardsinmenu [options] =head1 DESCRIPTION Find users with an given dashboard id in their DashboardsInMenu preference. =head1 OPTIONS This script supports a few options. =over =item B<-h>, B<--help> Display this documentation =item B<--id> The dashboard id to search for. =back =head1 AUTHOR Christian Loos <cl...@netcologne.de> =head1 COPYRIGHT AND LICENCE Copyright (C) 2014, NetCologne GmbH. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO =over =item L<http://issues.bestpractical.com/Ticket/Display.html?id=29719> =back =cut 1;
-- RT Training - Boston, September 9-10 http://bestpractical.com/training