Hi, I have Drupal 5.7 running automated logout 5.x-22 and countdown timer 5.x-1.18. Both modules are enabled, and auto. logout is also enabled on settings page.

When I look at the logout block, it shows what it showed before installing countdown timer: You will be automatically logged out at Mon, 07 Apr 2008 13:57:13 -0300 if this page is not refreshed before then.

I've tried disabling auto. logout and countdown timer, enabling in different orders, removing from modules directory and reinstalling, etc. Doesn't matter what I try, automated logout doesn't use countdown timer.

Comments

jrglasgow’s picture

Status: Active » Postponed (maintainer needs more info)

take a look at the Countdown Timer settings page 'admin/settings/countdowntimer', what do you have set for your 'Javascript load options' ? It needs to be set for 'Every Page', is this the case?

aniskhan’s picture

yes it is.

i saw the source code of a page and at the top the countdown timer inserts this:

however, in my root directory (pan_d5), there is no 'countdowntimer' directory... ??? did it try to create it when the module was installed/enabled and it didn't have write permissions on the server?

aniskhan’s picture

ok, i see the problem. on the countdown timer source code it checks to see if clean_urls is enabled (on line 62 of countdowntimer.module). if it is, it sets "countdowntimer/timerjs" as the source of the jscript code, otherwise it sets it to "index.php?q=countdowntimer/timerjs" (which would work on my site)

i have Clean URLs disabled, so I don't understand why countdowntimer gets TRUE when doing a variable_get('clean_url', 1).... hmm...

aniskhan’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

ok, solved it. clean_url variable was returning 1 because clean_url is not set, and since it's asking for it like variable_get('clean_url', 1), then it sets the default to 1. i would recommend doing the call like variable_get('clean_url', 0) since most people don't have clean_url working at the beginning (suggestion for countdowntimer)

so i went to my sites/default/settings.php page and added this at the end:
$conf = array('clean_url' => 0);

which fixed the problem.

jrglasgow’s picture

Status: Needs review » Postponed (maintainer needs more info)
StatusFileSize
new1.57 KB
new1.28 KB

the check to see the clean_url setting

variable_get('clean_url', 1)

if there is no 'clean_url' setting it uses the default 1 (true) this needs to be

variable_get('clean_url', 0)

assume that clean_url is false, since if it is true it will definitely be set.
these patches fix this problem

jrglasgow’s picture

Project: Automated Logout » Javascript Countdown Timer
Version: 5.x-2.2 » 5.x-1.9
Component: Miscellaneous » Code
Category: support » bug
Status: Closed (fixed) » Needs review
jvandervort’s picture

Status: Postponed (maintainer needs more info) » Fixed

Commited.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.