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

[eluser]wiredesignz[/eluser]
@Stylec, Please post the controller code.

[eluser]Stylec[/eluser]
admin/views/index.php
Code:
<!-- Admin Home Page -->
<h1>Overview</h1>
<div id="left-block">

    &lt;?php
    foreach ($modules as $row)
    {
        echo '<div id="block-management">';
        echo '<h2>' . $row->name . '</h2>';
        echo modules::run('news/controllers' . '/admin', '', 'adminpanelblock');
        echo '</div>';
    }
    ?&gt;
        
</div

news/controllers/admin.php
Code:
class Admin extends Controller {
        
        function Admin()
        {
            parent::Controller();
        }
        
        function adminpanelblock()
        {
            echo 'News :: Admin';
        }
    }

Thanks.

[eluser]wiredesignz[/eluser]
Hi Stylec, Try:
Code:
&lt;?php
    foreach ($modules as $row)
    {
        echo '<div id="block-management">';
        echo '<h2>' . $row->name . '</h2>';
        echo modules::run('news/admin', '', 'adminpanelblock');
        echo '</div>';
    }
    ?&gt;

[eluser]Stylec[/eluser]
That generates
Code:
Unable to locate the requested file: application/modules/news/methods/adminpanelblock.php
Does that suggests that news/controllers/admin is correct?

[eluser]wiredesignz[/eluser]
The error suggests that modules::run has loaded admin.php but can't locate adminpanelblock() and has tried to load a module/methods library before failing.

Are you sure there aren't any other admin.php controllers in the search path?

[eluser]Stylec[/eluser]
I've got 3 admin.php files.
1 in each module, admin, member & news.
I've just changed the news admin.php file to admina.php to make it unique and updated the modules::run code but still get the same error
Unable to run the requested module: news/controllers/admina->adminpanelblock.

[eluser]wiredesignz[/eluser]
@Stylec, Can you post a debug log file please?

[eluser]Stylec[/eluser]
How do I do that Smile

EDIT:
Is this it?
Code:
DEBUG - 2008-07-23 15:00:57 --&gt; Config Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Hooks Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; URI Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Router Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Output Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Input Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Global POST and COOKIE data sanitized
DEBUG - 2008-07-23 15:00:57 --&gt; Language Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Loader Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Admin Controller Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Helpers loaded: url
DEBUG - 2008-07-23 15:00:57 --&gt; Database Driver Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; Session Class Initialized
DEBUG - 2008-07-23 15:00:57 --&gt; File loaded: application/config/autoload.php
DEBUG - 2008-07-23 15:00:57 --&gt; File loaded: application/modules/admin/models/admin_model.php
DEBUG - 2008-07-23 15:00:57 --&gt; Model Class Initialized

[eluser]wiredesignz[/eluser]
Is there any more to it? Set log threshold = 4

I dont see the views loaded or any modules.

[eluser]Stylec[/eluser]
With
Code:
$config['log_threshold'] = 4;
thats all I get.




Theme © iAndrew 2016 - Forum software by © MyBB