MyBB Community Forums

Full Version: 1.6.11 language loading ACP bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
It got on my nerves and was trying to debug it since then.

http://community.mybb.com/thread-146401-...pid1040454

I guess this is a bug and I'm not just alone.

http://prntscr.com/1w1tw5

The MyBB system is mistaken for finding the language files used or required in many plugins to be found inside inc/languages/admin directory instead of the regular inc/languages/ directory.

It seems its purposefully looking for /admin/ directory instead of the default ones.

So after a few minutes of debugging I found these lines to be an issue:

elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
		{
			require_once $this->path."/".$this->fallback."/".$section.".lang.php";

around line 151-152.

I've altered them with below instead (however I'm not sure about this 100% as the $fallback variable seems to be new in this version, so what's this all about btw?) and you can apply this patch to use your ACP as intended until an official fix is provided:

See this post and apply that patch: http://community.mybb.com/thread-146406-...pid1040518

Thank you.
not sure what is fixed --> http://dev.mybb.com/issues/2234
Thanks, we're already taking care of that internally.

Temporary solution below.

File: inc/class_language.php

Find:
		if(file_exists($lfile))
		{
			require_once $lfile;
		}
		elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
		{
			require_once $this->path."/".$this->fallback."/".$section.".lang.php";
		}
		else
		{
			if($supress_error != true)
			{
				die("$lfile does not exist");
			}
		}

Replace with:
		if(file_exists($lfile))
		{
			require_once $lfile;
		}
		elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
		{
			require_once $this->path."/".$this->fallback."/".$section.".lang.php";
		}
		elseif(file_exists($this->path."/".str_replace('/admin', '', $this->fallback)."/".$section.".lang.php"))
		{
			require_once $this->path."/".str_replace('/admin', '', $this->fallback)."/".$section.".lang.php";
		}
		else
		{
			if($supress_error != true)
			{
				die("$lfile does not exist");
			}
		}
Yes, that works fine Diogo. I guess the new edits to the file were done for other than English language packs, probably for plugins?
Not sure to be honest...I already got an error on a fresh installation. We'll discuss internally what to do. Meanwhile, everyone please use this fix.
So has this bug been already fixed because I have just upgraded and don't have any errors!
Glad I found this. I had the same error after installing the updated files download.
How come I don't get this error? Where do you get this error?
(2013-10-08, 06:05 PM)marcus123 Wrote: [ -> ]How come I don't get this error? Where do you get this error?
When accessing Admin Control Panel (ACP).

It's possible the team applied a fix and updated the download package.
Thanks for the fix. Glad to know I didn't break something on my board.Wink

(2013-10-08, 06:05 PM)marcus123 Wrote: [ -> ]How come I don't get this error? Where do you get this error?

I don't know about everyone else, but I was getting it when editing a template.
Pages: 1 2 3 4 5