I installed the text size module and it works flawlessly for authenticated users but not for anonymous ones, although I took care the anonymous users are allowed to access the text size module. The strange thing I notice in the server logs is that when an authenticated user clicks on the 'increase' button he gets a "302" status code and is redirected to the page he came from:
"GET /index.php?textsize=+10 HTTP/1.1" 302 7057 "https:///"
However, an unauthenticated/anonymous user gets a "304" status code and nothing happens with the font size:
"GET /index.php?textsize=+10 HTTP/1.1" 304 - "https://URL/index.php?textsize=+10"
I'm using Drupal with "simple URLs", i.e. I have rewriting enabled in my apache server config:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Could it be that this is the source of the above problem?
Comments
Comment #1
dmiric commentedHello,
I have the similar problem
module works fine for logged users
anonymous users get redirected to home page and font size stays the same
anyone managed to do figure out what is the problem ?
Comment #2
dmiric commentedReply to my self :)
I found what the problem was with...
If you keep your drupal in a sub directory as http://localhost/drupal in .htaccess theres a line
RewriteBase /drupal
you need to enable that for Text Size module to work good for anonymous users
Cheers!
Comment #3
jtjones23 commentedI'm having the same problem with the text not changing for anonymous users. The site is not in a sub-directory but it is on shared hosting. The text size does not change for anonymous users and they're redirected to the home page. Any suggestions?
Update: Just tried the March 5 dev version and text size still does not change for anonymous users.
Drupal 5.7
Apache 2.2.4
PHP 5.2.5
MySQL 5.0.45
Comment #4
pokita commentedMy Drupal installation is not in a subdirectory. I skimmed over the code and textsize uses the hook_user for changing the textsize. However, it seems in my site this hook is never called for anonymous users? Maybe this should be better done through custom_url_rewrite?
Comment #5
pokita commentedOK, I think I found the problem: textsize is not compatible with caching - while this is to be expected for "aggressive" caching, it does also not work with normal caching on my site. If I deactivate caching, everything works as expected also for anonymous users. However, deactivating caching is not acceptable for me since this takes just too much load on the web server, so I guess I can't use this module. I'd much appreciate if this could somehow be fixed. I already tried to use hook_init instead of hook_user (which also lets Drupal note that this module is incompatible with aggresive caching) but to no avail.
Comment #6
nrasmus commentedJust discovered this for my own site too (after many hours theming the buttons, etc--that'll teach me to develop before thorough testing . . .). Has anyone came up with a workaround for this? If not, another means of achieving this funcitonality via css and xhtml (as opposed to javascript)?
Comment #7
buddaSame problem for me too. With no solutions in sight it might seem.....?
Comment #8
CZ commentedFixed.