Auto refresh doesn't work

Moderator: crythias

Locked
katerina
Znuny newbie
Posts: 46
Joined: 19 Jul 2012, 13:01
Znuny Version: 3.1.7
Real Name: Katerina
Company: PNB

Auto refresh doesn't work

Post by katerina »

Hi,
I did several upgrades and then auto refresh of dashboard and tickets stopped working.
I found that in the source code of the page there is no meta-equiv refresh, so after I have read viewtopic.php?f=62&t=7491

I put in /opt/otrs/Kernel/Output/HTML/myMotiv/HTMLHead.dtl

Code: Select all

<meta http-equiv="refresh" content="120">


This hack works, but now our technicians are complaining that the system is reloading when they are writing a ticket. So we need the system auto refresh only if a page without input is open. (That means dashboard and tickets)

Sorry, understand only the last answer of the viewtopic.php?f=62&t=7491, but I don't understand the answer before the last, which may be the right way to solve this issue (?)

In ttlcache I have 0.5 - I think that means 30s, it looks like OK for me and I have set refresh time 2minutes in user profiles, but it has no effect.

Thank you for any help.
otrs v.5 on linux CentOS 6.8 with MySQL Ver 14.14 Distrib 5.1.73, openLDAP
katerina
Znuny newbie
Posts: 46
Joined: 19 Jul 2012, 13:01
Znuny Version: 3.1.7
Real Name: Katerina
Company: PNB

Re: Auto refresh doesn't work

Post by katerina »

I don't know the way to solve this problem nor where else to gain help, so I wil write here what I find out.

In /opt/otrs/Kernel/Output/HTML/Standard/HTMLHead.dtl

Code: Select all

<script type="text/javascript">
// We don't use an http refresh header any more because it causes problems with
//  open dialogs / popups (see bug#7135 and others).
var RefreshSeconds = parseInt("$QData{"Refresh"}", 10) || 0;
if (RefreshSeconds) {
    window.setInterval(function() {
        // If there are any open overlay dialogs, don't refresh
        if ($('.Dialog:visible').length) {
            return;
        }
        // If there are open child popup windows, don't refresh
        if (Core && Core.UI && Core.UI.Popup && Core.UI.Popup.HasOpenPopups()) {
            return;
        }
        // Now we can reload
        window.location.reload();
    }, RefreshSeconds *  1000);
}
</script>
So the problem with refresh header is known and otrs solves it by javascript.
So my next question is: Why this javascript doesn't work for me? Or

I found file
/opt/otrs/Kernel/Output/HTML/HeaderMetaRefresh.pm which has only 43 lines.
There I found the lines I have seen in
viewtopic.php?f=62&t=7491

Code: Select all

# get needed objects
    for (qw(ConfigObject LogObject LayoutObject TimeObject)) {
        $Self->{$_} = $Param{$_} || die "Got no $_!";
    }
Now I feel stuck again. How can I be sure the perl script /HeaderMetaRefresh.pm is running? I understand perl very poorly.

Thanx for any help.
otrs v.5 on linux CentOS 6.8 with MySQL Ver 14.14 Distrib 5.1.73, openLDAP
katerina
Znuny newbie
Posts: 46
Joined: 19 Jul 2012, 13:01
Znuny Version: 3.1.7
Real Name: Katerina
Company: PNB

Re: Auto refresh doesn't work

Post by katerina »

Now I tried to downgrade otrs from version 3.3.6 to our previous version 3.3.4 and auto refresh works. So I have solved the problem for me, but I think it is a bug in version 3.3.6
otrs v.5 on linux CentOS 6.8 with MySQL Ver 14.14 Distrib 5.1.73, openLDAP
katerina
Znuny newbie
Posts: 46
Joined: 19 Jul 2012, 13:01
Znuny Version: 3.1.7
Real Name: Katerina
Company: PNB

Re: Auto refresh doesn't work

Post by katerina »

Today I upgraded to version 3.3.7, but auto refresh doesn't work for me in this version, too. So I downgraded to version 3.3.4 and autorefresh works again. Did I miss anything?
otrs v.5 on linux CentOS 6.8 with MySQL Ver 14.14 Distrib 5.1.73, openLDAP
Locked