Modular Extensions - Version 4.3 |
[eluser]wiredesignz[/eluser]
Well I see very little happening in your logs. The admin_model loads and it stops? Example log: Code: DEBUG - 2008-07-17 17:06:20 --> Config Class Initialized
[eluser]Stylec[/eluser]
Ok ive done a clean install of CI 1.6.3 + ME 4206. Moved the welcome controller and welcome view into a module. Created an admin module with just 1 controller (admin.php) and 1 method called 'test'. The admin method 'test' just echos a string. In the welcome_message.php view file ive just got Code: echo modules::run('admin', '', 'test'); Code: DEBUG - 2008-07-23 17:50:44 --> Config Class Initialized But when I change it to Code: echo modules::run('admin/controllers/admin', '', 'test'); Code: DEBUG - 2008-07-23 17:52:11 --> Config Class Initialized Maybe its not possible to call a method from a controller which isn't named the same as the module folder?
[eluser]a&w[/eluser]
You might try: Code: echo modules::run('admin/admin', '', 'test');
[eluser]Stylec[/eluser]
OK, that works in my clean install of CI + ME, and from that ive found that its because of the search paths as suggested by wiredesignz. So how can I get around the problem of having an admin.php controller in each module? I would have thought that as I specify the module the method is in, it wouldn't have been a problem.
[eluser]Chicken's Egg[/eluser]
I had some unexpected behaviour of ME today. A have split the application folder into two separate folders: back-end en front-end. www.mysite.com/admin/ brings me to the back-end of the application. Normally the frond-end is used. Situation: - DIR: admin - FILE: index.php - DIR: frontend - DIR: controllers - FILE: base_controller.php - (..) - DIR: modules - DIR: home - DIR: controllers - FILE: home.php- DIR: backend - DIR: controllers - FILE: base_controller.php - (..) - DIR: modules etc. - DIR: home - DIR: controllers - FILE: home.php - DIR: media - FILE: index.php My default controller is home.php Situation now: www.mysite.com/admin/ Shows backend home.php www.mysite.com/admin/home/ Shows frontend home.php The last is wrong and should have shown up the backend aswell. The base_controller is called like include_once(APPPATH . 'controllers/base_controller.php') but doesn't have a function yet. I'm a little bit confused.
[eluser]wiredesignz[/eluser]
Why would you assume ME is doing this and not something else you have altered, or forgotten to alter correctly?
[eluser]Chicken's Egg[/eluser]
Well, I can't exclude that possibility, thought I wonder what it would have been. Base_controller.php Code: <?php home.php Code: <?php I don't see any problem with these controllers. The controllers in the frontend look equal, but of course an other text is showed. Alternations: The follow is changed (according to the wiki) in order to get two applications: 1) Create a new directory called 'admin/'. 2) Copy the index.php file in 'admin/' 3) Copy the application folder and call it ' 4) Open admin/index.php. Alter: - Line 44: $application_folder = "../backend"; I wonder why I don't get the result I expect. There are no error-messages and I don't see anything special in the debug. I've also tested the possibility to place home.php into the default backend-controllers directory; same result. As for your question: no I don't know whether this is a CI or a ME problem. As www.mysite.com/admin/ worked fine I thought it might be a ME problem.
[eluser]wiredesignz[/eluser]
[quote author="Chicken’s Egg" date="1217325920"]I don't see any problem with these controllers.[/quote] So where are the class variables for $this->view_dir and $this->data as shown above? Why not remove the Modular Extensions libraries and see if your controllers load properly without it first.
[eluser]Chicken's Egg[/eluser]
I solved the problem by adding a .htaccess file in the admin-directory. I hope this will do the trick. Quote:Why not remove the Modular Extensions libraries and see if your controllers load properly without it first.I had done that, without any result.
[eluser]wiredesignz[/eluser]
[quote author="Chicken’s Egg" date="1217339468"]I had done that, without any result.[/quote] So the problem was not with Modular Extensions. Good luck with your application. |
Welcome Guest, Not a member yet? Register Sign In |