Hey,
i'm new with fuel and i'm hit:
i tried to improve the error handling and extended the system->core->config.php.
I created a new MY_Config.php which will be loaded perfectly.
BUT: Your page_router is one of the top-level loadings. The Constructor of the Page Router is requesting the sytem/core->config BEFORE My_config is loaded to overwrite some features.
Am i wrong? Can you show me a way out?
Thank you,
webcam
Comments
Also i think this is not a fuel question. I tried to to extend the core->config.php file to overwrite the load(); function. But it wont recognize it.
i changed the third_party->mX->config.php from:
class MX_Config extends CI_Config
to:
class MX_Config extends MY_Config.
--
when i create a controller in application->controller-> eg. welcome.php
and i want to call it (http://www.site.com/welcome), an error will thrown:
"The configuration file fuel.php does not exist."
after a little bit playing around with my error handler, i realized, fuel cms is searching the fuel.php in:
"fuel/application/config/fuel.php"
why is that?
now it works, i needed to set $config['enable_hooks'] to FALSE;
if i enable hooks, i cant create a own controller. is this possible?
Also, FUEL needs the hooks set to TRUE because it uses a couple of them.
thank you for your response.
i can't extend my_config in application/core to mx_config.
but i can create - like you said - a config.php in third_party/fuel:
require_once(APPPATH.'third_party/MX/Config.php');
class Fuel_Config extends MX_Config{}
--
and then in application/core:
require APPPATH."third_party/fuel/Config.php";
class MY_Config extends Fuel_Config{
// in this class i overwrite the load function()
}
--
but with that i'll overwrite the load function from mx ->actually very bad
-----
If i enable the hooks and create a controller (like site.com/myPage), fuel try to load the fuel config file the common way (application/config/fuel.php) - do you have any clue about that?
anyway. my real problem - missing fuel.php config file, when i try to create a page with a controller - is still present.
if i remove the pre_controller() hook, my controller page will be loaded perfectly.
still searching...