Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - Version 4.3

[eluser]Maxximus[/eluser]
I'm getting an error: 'Unable to load your default controller'. I've installed fresh CI 1.6.2, replaced the application dir with the downloaded one. any idea?

[eluser]wiredesignz[/eluser]
Version 4.1.02 is available on the wiki.

Fixed routing and method loader.

EDIT:
Please check all the config, routes and database settings match your installation when trying out the sample application.

[eluser]Maxximus[/eluser]
Ok, tried the new version. Used default CI-settings (and the supplied config settings).
On line 148 in CodeIgniter.php the
Code:
APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT
gives:
/home/maxximus/web/htdocs/ci/system/application/controllers/../..//home/maxximus/web/htdocs/ci/system/application/controllers//welcome.php

the MY_Router.php function is:
Code:
function fetch_directory()

    {

        return ($this->directory) ? '../../'.$this->directory : '';

    }

Not yet figured out where to find the issue, but for one reason or another the $RTR->fetch_directory() returns the absolute path.

[eluser]wiredesignz[/eluser]
Yes thats correct. fetch->directory adjusts for the modules path. Can you post the actual error message you get please Maxx.

EDIT:
Oh, the error may be because I have moved the application directory into docroot, parallel to system.

[eluser]wiredesignz[/eluser]
Version 4.1.03 is now available on the wiki.

Fixed routing and absolute paths problem. Thanks Maxximus Wink

Please check all the config, routes and database settings match your installation when trying out the sample application.

The sample application can be seen here:
http://www.wiredesignz.co.nz/CI_1.6.2/in.../userguide

[eluser]sikkle[/eluser]
Hey wiredesignz,

Great job !

see ya around.

[eluser]Pascal Kriete[/eluser]
[quote author="wiredesignz" date="1211138860"]
The sample application can be seen here:
http://www.wiredesignz.co.nz/CI_1.6.2/in.../userguide[/quote]
The user guide is the sample application?

[eluser]a&w[/eluser]
Apologies in advance for noobish questions/comments.

Suggestion: This thread is quite long, the forum search is better these days, but still, with the new branch of this extension I wonder if you should start a new forum thread? This thread might get confusing if some people don't upgrade to v4.

So, I've been to wiki and I think some of the documentation there may be dated, some references to the pre v4 extension perhaps? Things like:
Quote:The modular_extensions.php library should be placed...
Does that file exist any more?

For someone starting new with this I investigated what files might be involved. The results of this are shown here:
Code:
L application
   L config
      application.php (copy new)
      autoload.php (modify)
         $autoload['helper'] = array('url','debug');
         $autoload['config'] = array('application');
   L helpers
      debug_helper.php (copy new)
      modules_helper.php (copy new)
   L libraries
      Controller.php (copy new)
      MY_Router.php (copy new)
   L controllers
      error.php (copy new)
      welcome.php (original)
   L modules
      L userguide
         L controllers
            userguide.php (copy new)  
         L views
            content.php (copy new)  
            footer.php (copy new)  
            header.php (copy new)  
      L welcome
         L controllers
            page.php (copy new)  
         L views
            error_message.php (copy new)
      L template_directory
         L config *
         L controllers
         L helpers *
         L models *
         L plugins *
         L views
   L views
      welcome_message.php (original)

If I navigate to: http://yourDomain.com/userguide looks like it's working for the most part.

Some questions/comments:

1. I visited your site and it looks like the codeigniter logo points to http://dev.ellislab.com/.../images/ci_logo_flame.jpg instead of a local copy. I had not investigated far enough to see why the outside reference.

2. Your post clearly indicates to navigate to http://yourDomain.com/userguide which works. However, if you note from the above folder structure, there is a modules/welcome page delivered with the package, but it doesn't appear functional in present configuration. If you just hit http://yourDomain.com then it just serves up the non HMVC application/views/welcome_message.php file. It would be less confusing for me if the welcome module served up some view (have it use the application/views/welcome_message.php maybe to show that capability?).

3. It also appears the following line is not used in the modules/userguide/controllers/userguide.php controller:
Code:
$mainpage = $main_dir.'index.html';    (line 26)

[eluser]wiredesignz[/eluser]
@inparo, Yeah, your printable userguide is being used as a module controller. Thanks Wink

@a&w;, Thanks for your comments. The wiki does need updating to reflect the new version.

[eluser]a&w[/eluser]
You may be working on editing the wiki, after some more playing with this I think the following edit may be appropriate:

Currently:
Code:
Module files will be loaded successfully if they are found located anywhere in this directory search sequence, for example: Loading a module controller or partial named module.php
//Loading a module controller
application/modules/module_name/controllers/module.php
application/modules/module_name/module.php
application/modules/module.php

The same applies for models, libraries and views, etc.

Good chance I made an error somewhere, but as far as I can tell it's only checking two locations for views/controllers (first in the module directory, then in the 'typical' view or controller directory).
1. application/modules/module_name/views/module.php
2. application/views/module.php




Theme © iAndrew 2016 - Forum software by © MyBB