After installing path_access module and blocking the tracker for anonymous users, I logged out and tried. It works but switches from the default language of the website (Czech) into English - more specifically all headers (navigation, browse archives, etc.) appear in English (as well as the "access denied" warning).

The correct behaviour should be a message in Czech and all headers unchanged.

Comments

budda’s picture

Hmm, I don't know how international language support is handled - but the path_Access doesn't do anything special, it simply pulls up the default access denied page defined in your drupal settings.

I'm happy to resolve this if you could find out what the issue is?

intu.cz’s picture

My purely hypothetical guess is that when it pulls up the default access denied page defined in the drupal settings (in my case it is the default one), it forgets to keep the respective language "switched on" so it defaults to English. I tried switching English off but it still shows access denied in English... I would assume that it's something to do witht the path_access module, everything else works OK languagewise.

budda’s picture

Status: Active » Closed (won't fix)

When a visitor is not allowed to access a certain path the module simple calls drupal_access_denied();

Whatever you see is caused by the above function.

As you can see from the developers docs, the function looks for whatever you as a site administrator has defined for the variable_get('site_403', '').

If that's not defined it falls back to a default string t('You are not authorized to access this page.'); which you can change using the locale.module

It's not a bug in path_access.module, sorry.

intu.cz’s picture

I looked at the apache2 logs and could not find anythong suspicious. The only thing I discovered is that in the source the lang is missing.

<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">

In all other cases the "not found page" appears in Czech...

budda’s picture

The drupal_access_denied() should use your themes page.tpl.php (if you are using phptemplate theme engine) to render the access denied page.

So I'm assuming something is going on there somewhere.

Why not define a proper 403 access denied node in your Site settings to remove the problem?

intu.cz’s picture

Thanks for the info. I thought about defining a page for 403, but to define a 403 access denied node in the site settings would perhaps cause another problem. I am waiting for the i18n.module to set up multilingual content (it's for a translation studio) and my hope was that the 403 access denied pages would also stay multilingual... (I am not sure it would be possible to define many versions without some magic... beyond my capabilities).

I just checked the tracker (switched off the path_access) and it appears in English as well (saying "recent posts") but the header has lang="cs" xml:lang="cs"... I'll try and raise the issue on the tracker module issue pages.