I noticed that geoip_language.txt file is used in files/ but when I add a new language, it's not reset therefore no changes are visible until I delete it manually. Is that intentional?

To be honest, I feel that this feature is not needed. It's a lot of hassle for just one SQL query. I would cache that statically in one page load and use Drupal cache system for it. It wouldn't be any problem for small sites and bigger ones are using memcache anyway.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

I kind of agree with you. I think the initial intent of it was to allow the redirection to occur before Drupal was fully bootstrapped. See the geoip_language.fastpath.inc for an example.

That said adding a language shouldn't alter the file until you provide a country mapping, right?

drewish’s picture

Status: Active » Postponed (maintainer needs more info)
Zardoc’s picture

FileSize
1.82 KB

This patch fixes the issue until a better workflow can be implemented.

drewish’s picture

Status: Postponed (maintainer needs more info) » Needs work

indenting seems off, also it'd be good to have that file generation code moved into a helper function.

Zardoc’s picture

FileSize
2.19 KB

Update of geoip_language.patch.

Zardoc’s picture

FileSize
2.21 KB

geoip_language.patch final.

Zardoc’s picture

FileSize
857 bytes

Here is a better fix for this issue. Using this method we flush the static cache as well as update the geoip_language.txt in the file system.

drewish’s picture

Title: geoip_language.txt cached but not reset » geoip_language.txt not regenerated after adding or removing mapping
Status: Needs work » Fixed

Thanks, committed to HEAD.

Status: Fixed » Closed (fixed)

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