CodeIgniter Forums
BackendPro 0.6.1 - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: BackendPro 0.6.1 (/showthread.php?tid=7381)

BackendPro 0.6.1 - El Forum - 06-16-2009

@DanKey: Thanks for that, I have added to my ticket system. I am in the process of re-writing the asset library so this will be fixed in the next release.

@Mitchell McKenna: Thanks for this, to my knowledge there is no javascript being executed on that page that would do this. I do have a feeling it may be something to do with when the asset cache files are created. A buffer is used and it may not be getting cleared. I have added it to my ticket system to look at, if you get any more info on the bug, for example do you have asset caching on, etc do let me know.

@timtom: I think rather then saving the value in the config, which is system wide, only use the session value. Otherwise every time a new user comes with a diff language it will be trying to update the entire website language value, not good.

BackendPro 0.6.1 - El Forum - 06-16-2009

@Adam: of course, that bit was a bit foolish of me, and I quickly realized my mistake. The language is now stored in the users preferences database and loaded into the session values upon login.

My only trouble is that I need the language setting to reload after the user sets a new language using the code above. What can I do to load the correct language files after changing the prefs (in a controller)?

BackendPro 0.6.1 - El Forum - 06-16-2009

I believe I had solved this before. When I get home I will fire up my old machine and hope the code is on there.

BackendPro 0.6.1 - El Forum - 06-16-2009

God I love version control, I had a look and all the old language detection code I wrote can be found in the following changeset:

You will find it in root/trunk/system/modules/language.

It looks very like your way of doing it, so there is no guarantee it will work, but it may depend on where the library is called. It is one of the first things I call in the BackendPro.php class (

Have a look at it or try the code. Again no guarantees it will work.

BackendPro 0.6.1 - El Forum - 06-16-2009

[eluser]Mitchell McKenna[/eluser]
@adam Running on fresh install, default settings, so I don't believe asset caching is on. Also, I disabled javascript in my browser and the form wasn't duplicated anymore, so it's either javascript or something javascript brings in to the login form.

BackendPro 0.6.1 - El Forum - 06-16-2009

Actually, in the mean time I (almost) solved it by extending the MY_language library with a reload function:

function reload($langfile = '', $idiom = '', $return = FALSE)
        $complete_langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)).'_lang'.EXT;
        if (in_array($complete_langfile, $this->is_loaded, TRUE))
            // Remove the language file to be unloaded from the is_loaded array (otherwise it won't reload)
            $lang_index = array_search($complete_langfile,$this->is_loaded);
            // Reshuffle the values inside is_loaded so that there is no "empty" key
            $this->is_loaded = array_values($this->is_loaded);
            log_message('debug', 'Language '.$complete_langfile. ' unloaded');
        // Load the language
        return $this->load($langfile, $idiom, $return);

After setting the language preferences, I simply run this function for each language file in use.

Now there's still one glitch: reloading the language for the status and userlib isn't working yet.

BackendPro 0.6.1 - El Forum - 06-19-2009

Hi Adam,

BeP is a great tool - and I've been working through it. Thanks for your contribution!

Once thing I did notice, now that I am putting more of my site's code into it, is that all of a sudden I get logged out of BeP.

I realize that there is probably an inactivity timeout setting somewhere (perhaps this is the standard CI session timeout); but it seems to happen even if I had *just* accessed the system. On the next click (sometimes within seconds), I'm being prompted for a login... there some method I should be calling within my controllers to 'refresh' the session, or something?

..I'm new to BeP (and CI in general) - is there someplace I should be looking to troubleshoot further?

-Thanks in advance,

BackendPro 0.6.1 - El Forum - 06-19-2009

No theres no timeout other than the browser session ending that I know of, no refresh method. When you say your adding your own code, what kind of code. Are you doing stuff with the session class?

Does this happen on a blank install of BeP and CI?

BackendPro 0.6.1 - El Forum - 06-28-2009

Hi there adam ,

it's nice to use this tools , but after a while i have this problem using the scaffolding for my development area. After i installed BEP i got this error when i want to use the scaffolding method.

An Error Was Encountered

Unable to load the requested file: view.php

could you lighten me up for this one...? cuz i think all the scaffolding BASEPATH in scaffolding.php are good.

BackendPro 0.6.1 - El Forum - 07-03-2009

I have to say I have never used Scaffolding and never with BeP. Are you trying to load the scaffolding into a Public_Controller or an Admin_Controller??

I would also point out it is deprecated as of CI 1.6.