Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - HMVC version 5.3

[eluser]otherjohn[/eluser]
I changed the controller to this
Code:
public function web_admin_menu()
    {          
            $this->load->view('navigation/web_admin_menu');
    }

and inside the view this
Code:
<?php if (!$this->acl->has_permission('edit_content')): ?>
        <li><a href="/admin/content">Content</a></li>
        &lt;?php endif; ?&gt;

And the error I get is this:
Code:
ErrorException [ Fatal Error ]: Call to a member function select() on a non-object
APPPATH/models/acl_model.php [ 82 ]
77     }
78    
79    
80     public function get_user_roles($user_id)
81     {
82         $this->db->select('role_id');
83         $this->db->where('user_id',$user_id);
84         $this->db->order_by('addDate','asc');
85         $query = $this->db->get('user_roles');
86         return $query->result();    
87     }

acl_model is called inside the ACL library.
This works fine as long as its not coming in through a module::run statement. I use it other places with the same calls. So I am not sure why it's doing this!

[eluser]otherjohn[/eluser]
... Yes, I have tried this in other HMVC controllers with no problems. It just has a problem if the controller is loaded using the module::run statement.

[eluser]Krzysiaczek[/eluser]
Try to read this thread from the beginning and find the part related to the scope of variables. My simple understanding is that MX controller is another object then CI controller so $this is not always what it seems to be, unfortunately.

[eluser]otherjohn[/eluser]
No problem. I am grateful for any help. This has been extremely frustrating for me.

[eluser]lewebdalex[/eluser]
Hi,

With the latest release, I've got :
Message: array_merge() [function.array-merge]: Argument #1 is not an array

For the filename: MX/Loader.php
Line Number: 286

Regards

[eluser]wiredesignz[/eluser]
Pushed a fix. Thanks.

[eluser]lewebdalex[/eluser]
Working Wink

Thanks!
Cheers,
Alex.

[eluser]Stunt[/eluser]
thanks to your great job
HMVC becoming inseparable part of my projects.

some problem here I have with HMVC in CI2 that not fixed yet.
then I decided to explain that here maybe someone know better way to solve it.


when I use modules::run in my normal CI controller loaded view file
some problem occurred.
The fix I use in my called module is it:

in my module controller:
1- extend to CI_Controller Instead of MX_Controller.
2- then you should change your module view address from CI orginal view directory in load. something like it :
Code:
$this->load->view('../modules/welcome/views/welcome_message')

3- next problem is using libraries! to fix it I load library in this way :
Code:
$this->session = $this->load->library('session')
even if you autoloaded library. you need load that in above way to make it work!

[eluser]Stunt[/eluser]
today, I get last commit (commit 95 - 8a261e951c42)
with creating own MY_Controller and extend it to MX_Controller everything fixed!

Code:
class MY_Controller extends MX_Controller {}

I dosent test it with older commits to check it works by MY_Controller in previous commits or effected by last commit
tanx anyway

[eluser]predat0r[/eluser]
Can somebody tell me how to use this HMVC and Sparks (getsparks.org) side by side? Because the Spark system uses a MY_Loader.php, too.
Thanks,




Theme © iAndrew 2016 - Forum software by © MyBB