Part of the EllisLab Network
   
35 of 43
35
Modular Extensions - HMVC version 5.2
Posted: 13 May 2009 12:36 PM   [ Ignore ]   [ # 341 ]  
Summer Student
Total Posts:  7
Joined  01-03-2006

Could not load config file from the library module in version 5.2.09

Previously used

$this->ci->load->module('auth')->load->config('auth'TRUE); 

Now try

$this->ci->load->module($this->module)->load->config('auth'TRUE); 
and
$this->ci->load->config('auth'TRUE); 

Maybe someone knows how to solve the problem?

Profile
 
 
Posted: 14 May 2009 11:03 AM   [ Ignore ]   [ # 342 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

Hi Enshteyn, try using Modules::load()

$auth Modules::load('auth'); 
$auth->load->config('auth',TRUE); 
 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 14 May 2009 03:08 PM   [ Ignore ]   [ # 343 ]  
Summer Student
Total Posts:  7
Joined  01-03-2006

Thank you very much smile

Profile
 
 
Posted: 16 May 2009 11:59 AM   [ Ignore ]   [ # 344 ]  
Grad Student
Avatar
Rank
Total Posts:  45
Joined  09-01-2007

I’m trying to install this, and I’ve put the files into my app’s lib. folder, but I get this error:

Fatal error: Class 'CI' not found in /www/framework/application/libraries/Controller.php on line 7 

Which reffers to this:

/* create the application object */
CI::instance(); 

What is this? I’ve never seen it before. Is it some new version of $ci =& get_instance() ?

Profile
 
 
Posted: 16 May 2009 07:53 PM   [ Ignore ]   [ # 345 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

Never had that error myself, Maybe move the code and its comment to line 77 after the CI class definition.

CI::instance() creates a singleton application object for your module controllers.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 19 May 2009 02:21 PM   [ Ignore ]   [ # 346 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  117
Joined  11-13-2008
Skinnpenal - 16 May 2009 03:59 PM

I’m trying to install this, and I’ve put the files into my app’s lib. folder, but I get this error:

Fatal error: Class 'CI' not found in /www/framework/application/libraries/Controller.php on line 7 

Which reffers to this:

/* create the application object */
CI::instance(); 

What is this? I’ve never seen it before. Is it some new version of $ci =& get_instance() ?

I reported this issue about a month ago myself.

Profile
 
 
Posted: 19 May 2009 11:01 PM   [ Ignore ]   [ # 347 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007
wiredesignz - 16 May 2009 11:53 PM

Never had that error myself, Maybe move the code and its comment to line 77 after the CI class definition.

CI::instance() creates a singleton application object for your module controllers.

@bez, Try the fix I posted.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 22 May 2009 04:59 AM   [ Ignore ]   [ # 348 ]  
Grad Student
Avatar
Rank
Total Posts:  45
Joined  09-01-2007
wiredesignz - 16 May 2009 11:53 PM

Never had that error myself, Maybe move the code and its comment to line 77 after the CI class definition.

CI::instance() creates a singleton application object for your module controllers.

Yup, that fixes the issue. Thanks! smile

Profile
 
 
Posted: 23 May 2009 05:15 PM   [ Ignore ]   [ # 349 ]  
Summer Student
Total Posts:  7
Joined  01-03-2006

File: Controller.php. Line 234 - 239

Modules::load_file($model$path);
$model ucfirst($model);
CI::$APP->$_alias = new $model();
$this->_ci_models[$_alias] $_alias;
$this->$_alias->_assign_libraries();
return 
$this->$_alias

should be replaced by:

Modules::load_file($model$path);
$model ucfirst($model);
CI::$APP->$_alias = new $model();
$this->_ci_models[$_alias] $_alias;
CI::$APP->$_alias->_assign_libraries();
return 
$this->$_alias

 
because they do not load models in the library module

Profile
 
 
Posted: 25 May 2009 07:40 AM   [ Ignore ]   [ # 350 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

Got a report from Russian community member:

ME — 5.2.0.9
CI — 1.7.1

In the main application I use my own library for templates output.

application/libraries/Viewlib.php

class Viewlib
{
    
public $CI;

    public function 
__construct($params = array())
    
{
        $this
->CI = &get;_instance();
    
}

    
public function show($template$data null$return false)
    
{
        
return $this->CI->load->view($template$data$return);
    
}

In the master template I’m calling several modules and templates.
  — master template (app views folder) calling module (module uses it’s own views folder)
  — master template (app views folder) calling another template (“footer” from main app views folder)
  — getting an error “File not found”.

Doing a bit of debugging showed that template path points to last used module views folder.

application/controllers/welcome.php

class Welcome extends Controller
{
    
public function __construct()
    
{
        parent
::Controller();
        
$this->load->library('viewlib');
    
}

    
public function index()
    
{
        $this
->viewlib->show('main_app_template');
    
}

modules/module/controllers/module.php

class Module extends Controller
{
    
public function __construct()
    
{
        parent
::Controller();
    
}

    
public function index()
    
{
        $this
->load->view('module_template');//use CI Output.
    
}

application/views/main_app_template.php

<div<?php Modules::run('module'); ?> </div>
<?php

 
echo $this->viewlib->show('main_app_template_footer'); // here I've got "file not found"
?> 
Profile
 
 
   
35 of 43
35
 
‹‹ help me with helper      sorting question ››