Settings->Preferences interval refresh text is missing

Hi RT users,

I am working on an upgrade to RT 4.4.2 and just noticed an interesting issue. We are upgrading from 3.8.13. When I look at the Settings->Preferences page, the first two options for the two interval settings ‘Search results refresh interval’ and ‘Home page refresh interval’ appear correctly in text ‘Use system default (Don’t refresh search results.)’, ‘Use system default (Don’t refresh home page.)’, ‘Don’t refresh search results’ and ‘Don’t refresh home page’ appear correctly. The time-based items all appear as ‘ARRAY(0x99009d8)’ for example and not the text string that appears in our existing 3.8.13 instance: ‘Refresh xxx every 2 minutes’, ‘Refresh xxx every 5 minutes’. Even though the text does not appear correctly, the matching refresh interval is used. Is this a known problem or do I have a problem with my upgrade process?

Regards,
Ken

Here is the location of those strings in 3.8.13:

./lib/RT/I18N/nb.po
./lib/RT/I18N/nb.po
./lib/RT/I18N/id.po
./lib/RT/I18N/id.po
./lib/RT/I18N/et.po
./lib/RT/I18N/et.po
./lib/RT/I18N/pt_BR.po
./lib/RT/I18N/pt_BR.po
./lib/RT/I18N/en_GB.po
./lib/RT/I18N/en_GB.po
./lib/RT/I18N/it.po
./lib/RT/I18N/it.po
./lib/RT/I18N/mk.po
./lib/RT/I18N/mk.po
./lib/RT/I18N/fr.po
./lib/RT/I18N/fr.po
./lib/RT/I18N/ja.po
./lib/RT/I18N/ja.po
./lib/RT/I18N/lt.po
./lib/RT/I18N/lt.po
./lib/RT/I18N/nn.po
./lib/RT/I18N/nn.po
./lib/RT/I18N/lv.po
./lib/RT/I18N/lv.po
./lib/RT/I18N/nl.po
./lib/RT/I18N/nl.po
./lib/RT/I18N/hr.po
./lib/RT/I18N/hr.po
./lib/RT/I18N/el.po
./lib/RT/I18N/el.po
./lib/RT/I18N/bg.po
./lib/RT/I18N/bg.po
./lib/RT/I18N/es.po
./lib/RT/I18N/es.po
./lib/RT/I18N/fi.po
./lib/RT/I18N/fi.po
./lib/RT/I18N/pl.po
./lib/RT/I18N/pl.po
./lib/RT/I18N/cs.po
./lib/RT/I18N/cs.po
./lib/RT/I18N/sv.po
./lib/RT/I18N/sv.po
./lib/RT/I18N/de.po
./lib/RT/I18N/de.po
./lib/RT/I18N/he.po
./lib/RT/I18N/he.po
./lib/RT/I18N/pt.po
./lib/RT/I18N/pt.po
./lib/RT/I18N/sl.po
./lib/RT/I18N/sl.po
./lib/RT/I18N/rt.pot
./lib/RT/I18N/rt.pot
./lib/RT/I18N/zh_TW.po
./lib/RT/I18N/zh_TW.po
./lib/RT/I18N/zh_CN.po
./lib/RT/I18N/zh_CN.po
./lib/RT/I18N/is.po
./lib/RT/I18N/is.po
./lib/RT/I18N/tr.po
./lib/RT/I18N/tr.po
./lib/RT/I18N/ar.po
./lib/RT/I18N/ar.po
./lib/RT/I18N/da.po
./lib/RT/I18N/da.po
./lib/RT/I18N/pt_PT.po
./lib/RT/I18N/pt_PT.po
./lib/RT/I18N/hu.po
./lib/RT/I18N/hu.po
./lib/RT/I18N/ru.po
./lib/RT/I18N/ru.po

I cannot find any corresponding strings in 4.4.2.

Any ideas?

Regards,
Ken

Hi,

I have investigated a little bit more and in lib/RT/Config.pm the following code is used to set the labels:

SearchResultsRefreshInterval => {
    Section         => 'General',                       #loc
    Overridable     => 1,
    SortOrder       => 9,
    Widget          => '/Widgets/Form/Select',
    WidgetArguments => {
        Description => 'Search results refresh interval', #loc
        Callback    => sub {
            my @values = RT->Config->Get('RefreshIntervals');
            my %labels = (
                0 => "Don't refresh search results.", # loc
            );

            for my $value (@values) {
                if ($value % 60 == 0) {
                    $labels{$value} = ['Refresh search results every [quant,_1,minute,minutes].', $value / 60]; # loc
                }
                else {
                    $labels{$value} = ['Refresh search results every [quant,_1,second,seconds].', $value]; # loc
                }
            }

            unshift @values, 0;

            return { Values => \@values, ValuesLabel => \%labels };
        },
    },  
},

# User overridable options for RT at a glance
HomePageRefreshInterval => {
    Section         => 'RT at a glance',                       #loc
    Overridable     => 1,
    SortOrder       => 2,
    Widget          => '/Widgets/Form/Select',
    WidgetArguments => {
        Description => 'Home page refresh interval',                #loc
        Callback    => sub {
            my @values = RT->Config->Get('RefreshIntervals');
            my %labels = (
                0 => "Don't refresh home page.", # loc
            );

            for my $value (@values) {
                if ($value % 60 == 0) {
                    $labels{$value} = ['Refresh home page every [quant,_1,minute,minutes].', $value / 60]; # loc
                }
                else {
                    $labels{$value} = ['Refresh home page every [quant,_1,second,seconds].', $value]; # loc
                }
            }

            unshift @values, 0;

            return { Values => \@values, ValuesLabel => \%labels };
        },
    },  
},

It does look like an anonymous array references is being stored for the label values in both cases. This does not seem correct. Shouldn’t it be a string value?

Regards,
Ken

Hi,

Mystery solved. When trying to debug share/html/Widgets/Select, I copied the file to local/html/Widgets/Select so I could work on that copy. When I did that, with no actual changes, the text strings started to be displayed properly so I looked for other versions and there was a different version supplied with RT-Extension-HistoryFilter. I just copied the version 4.4.2 one over it, since the only differences where exactly these strings. It works correctly now, but the HistoryFilter extension needs to be updated.

Regards,
Ken