1. install module
2. load any language other then English and turn it as a default.
3. log in as admin and set some pages to be forbidden for Anonymous user (for instance: and "forum")
4. log out and visit one of those forbidden pages (for instance front page)

The page will be forbidden (Access denied message will be displayed correctly), but the locale won't be loaded - all translated strings turned English again. So, the usage of this module is impossible for non English sites.

Comments

budda’s picture

Status: Active » Closed (fixed)

When a user (or anon user) trys to visit a restricted URL and fails the path_access module simply calls the build in Drupal function drupal_access_denied();. I have no control over what that does.

To show a 403 access denied page in your own language, create a node and assign it as the access denied 403 error page in ?q=admin/settings

ardas’s picture

But I need to support several languages.
And what about other screen elements such as login block for instance ? They also become untranslated.

budda’s picture

I don't see how this is related to Path Access?

Please use Drupal 4.7 and see if you have the same problems. If so report it as a bug to the Drupal issue tracker.

ufku’s picture

4.7 has the same problem. it is becouse of exiting the script without initializing locale(locale_initialize)

here is the fix.

if($page_match) {
    $GLOBALS['locale'] = locale_initialize();//line added to initialize locale
    drupal_access_denied();
    exit;
  }
ardas’s picture

Thanks for the patch.
The problem really exists! I've migrated to 4.7 and found that it was not fixed.

Budda, please reopen this bug and apply the provided fix, so everyone can have it.
Thank you in advance.

budda’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.x-dev
Assigned: Unassigned » budda
Status: Closed (fixed) » Reviewed & tested by the community

Thanks for looking in to this. Am a bit busy at the moment for testing, but have added it to the CVS version of path_access. If all works fine, even on non-locale sites i'll close the bug.

budda’s picture

Status: Reviewed & tested by the community » Fixed

Assuming this did the trick as nobody has complained since.

Anonymous’s picture

Status: Fixed » Closed (fixed)