I'm trying to use Logotool in 4.7.3 to set a random logo on each page refresh. It seems to work just fine for authenticated users - but unauthenticated users have a problem. After a few page refreshes, they seem to get a page with no logo at all - and then at some point everything falls apart and you start to get blank pages.
The web server error log always has the same error for unauthenticated users:
[client 216.222.164.3] PHP Fatal error: Call to undefined function: file_scan_directory() in /home/thecedar/domains/beta.thecedar.org/public_html/sites/thecedar.allvoices.org/modules/logotool/logotool.module on line 126, referer: http://beta.thecedar.org/?time=1155356643
Comments
Comment #1
pobster commentedDisable your cache.
Pobster
Comment #2
pobster commentedActually maybe I should explain that rather than just give a straight answer...
Drupals cache mechanism*only* caches pages for anonymous users (hence your issue). Whilst it appears that you can specify code to be run under these circumstances in hook_menu by using (!$may_cache), it's not documented how this actually works... It's pretty obvious how it works for cached menu items, but it's not clear how I'd go about implementing something for the purpose of this module. In short, I cannot consider this a bug as by definition having a cache means you don't *want* something which changes on every page...
...Maybe if someone who knows a little about hook_menu and (!$may_cache) could shed a little light on what is possible I'd appreciate it? I won't hold my breath though as the last six technical questions I've asked in the forums have all gone unanswered...
Pobster
Comment #3
pobster commented