2016-02-24, 03:40 PM
The load function in class_language.php has fallback logic to use the English language pack if a secondary language is installed and is missing a required language file. This is not working correctly for the AdminCP. If you select a different language for the AdminCP (Home > Preferences > Admin Control Panel Language), the fallback path it generates has /admin/admin twice.
Example:
/d1/xxxxxxxx/inc/languages/arabic/admin/user_ougc_awards.lang.php Does Not Exist
/d1/xxxxxxxx/inc/languages/english/admin/admin/user_ougc_awards.lang.php Fallback Location
I fixed this by changing the elseif to the code below.
I did a quick search on the forums and do not see this logged as an issue anywhere. I installed a clean copy of MyBB 1.8.6 with the OUGC Awards plugin to ensure it was not an existing plugin/modification causing the problem.
elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
{
require_once $this->path."/".$this->fallback."/".$section.".lang.php";
}
Example:
/d1/xxxxxxxx/inc/languages/arabic/admin/user_ougc_awards.lang.php Does Not Exist
/d1/xxxxxxxx/inc/languages/english/admin/admin/user_ougc_awards.lang.php Fallback Location
I fixed this by changing the elseif to the code below.
elseif(file_exists($this->path."/".str_replace("/admin/admin", "/admin", $this->fallback)."/".$section.".lang.php"))
{
require_once $this->path."/".str_replace("/admin/admin", "/admin", $this->fallback)."/".$section.".lang.php";
}
I did a quick search on the forums and do not see this logged as an issue anywhere. I installed a clean copy of MyBB 1.8.6 with the OUGC Awards plugin to ensure it was not an existing plugin/modification causing the problem.