Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Engine
Component: Configure
Branches: master
The LANGUAGE Checker has a routine refresh_cache, which removes the working/language.cache file. It used to be called in Types/LANGUAGE.pm sub onChange But that's no long implemented. The code got copied to the checker, but isn't used.
We need to clear the language cache, or changes to the enabled languages is a NOP.
--
GeorgeClark - 24 Mar 2015
There is a 2nd issue. The LANGUAGE checker can also generate compressed language files. This also should not be in the checker, but should be triggered only when the configuration is written.
I wonder if we need some hook during save to drive an onChange routine. Probably needed elsewhere I'd guess.
--
GeorgeClark - 24 Mar 2015
Hi Crawford, I'm making some headway with this.
- Add a new option to the configuration spec: ONCHANGE="1" (for now)
- Defined a static method to a Checker, that is used to perform last minute checks or actions during save. (But NEVER modify the config).
- Extended LANGUAGE.pm checker. with onChange routine, to clear the language cache, (renamed refresh_cache stale code)
- Extend Wizards/Save.pm if Spec->ONCHANGE, call Foswiki::Configure::Checkers::{CHECKER}::onChange
That will let us deal with the LANGUAGE cache, and language file compression code. I think another option is for {Password}, to do the hash of the admin password.
Not sure yet if ONCHANGE should allow something to be passed, or just a boolean. So marking this Being Worked On
--
GeorgeClark - 24 Mar 2015