Welcome Guest, Not a member yet? Register   Sign In
Upgraded 2.0.3 to 2.1.0 cannot extend Loader.php anmyore

As the title says, I upgraded my installation from 2.0.3 to 2.1.0 and my extended MY_Loader.php is disregarded.
Everything worked fine in 2.0.3 and below, but in 2.1.0 my file is not used anymore by CI. I have changed the autoloader class so that helpers and languages are loaded after libraries (so I can use Session and Database in helpers and languages) and it stopped working in 2.1.0.

What I found out today, if I completely replace the Loader.php with a custom one (copy of original with the changes i extended in 2.0.3) it worked again, so my presumption is:

Extending Loader.php is not working, completely modifying and replacing it is possible.

Anybody has the same problems, or is it just me?

P.S.: I have not replaced my Loader.php in the systems folder, but copied it to the application/core folder and made the changes i needed.

[eluser]Karman de Lange[/eluser]
Try change the prefix to My_ (also in config.php and change class name name). For some reason double uppercase (MY_) letters don't want to load.. I wasted nice 2 days on this


Thanks for your input, but with my extension of the Lang class, everything works fine, just the Loader class doesn't want to be extended ^^

I tried out your fix (renamed my Prefix, files and classes from RP_ to Rp_) but still it would not load.


[eluser]Karman de Lange[/eluser]
I had same issue with loader class.

MY_Loader did not get processed with "MY_" as prefix in config
but My_Loader worked fine with "My_" as prefix in config.

my current working Loader extension is:

Config.php : $config['subclass_prefix'] = 'Vpx_';

My current loader is : file: "Vpx_Loader.php" (under application/core)

Class Vpx_Loader extends CI_Loader {

function __construct() {


function my_view($view_name, $output = null, $ajax = '') {
do something

hmm ... ok, will debug it some more when at home, maybe i forgot to change something vital

thanks again, at least now I know I am not alone with this problem Wink

If I remember correctly ... in 2.0.3 you had to put your extension in the libraries/ dir. It must be in core/ for 2.1.

Theme © iAndrew 2016 - Forum software by © MyBB