CodeIgniter Forums
sparks not loaded when using HMVC - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: sparks not loaded when using HMVC (/showthread.php?tid=44845)



sparks not loaded when using HMVC - El Forum - 08-28-2011

[eluser]goFrendiAsgard[/eluser]
I follow this step :
http://getsparks.org/set-up-mx
I do manual installation of sparkManager 0.0.5
I override Loader.php and Module.php as instructed

I'm using CodeIgniter 2.0.3,
newest HMVC from bitbucket
ion_auth 2.0.4

Then I make a controller which load ion_auth:
Code:
$this->load->spark('ion_auth/2.0.4');
$ion_auth = $this->ion_auth;

I got this error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Welcome::$ion_auth

Filename: controllers/welcome.php

Line Number: 33

I've also try to debug,.... and stucked at line 5 of third_party/MX/Module.php (http://getsparks.org/static/install/mx/Modules.php.txt)
Code:
if(!defined('SPARKPATH'))
{
        define('SPARKPATH', APPPATH.'sparks/');
}
the SPARKPATH would be "application/sparks", I know it should actually refer to "sparks". I tried to fixed it, but the error still occurred.

I think it is not ion_auth problem, since I've try to make my own spark, and got the same result.

Is there anybody with the same problem?

Or is there anybody with a success story of doing this?

PS:
I'm using ubuntu 10.10, there is no reason to have a wrong extention file as someone using windows with hidden extension,.....


sparks not loaded when using HMVC - El Forum - 03-16-2012

[eluser]Unknown[/eluser]
Thanks very much for this! It solved most of my problems using Sparks with modular extensions. Now the only problems I have are:

(1) It doesn't seem to load helpers in the spark. If I put the following in the spark config autoload.php:

$autoload['helpers'] = array('test_helper');

it doesn't seem to load the test_helper.php file located in the helpers directory within the spark.

(2) Also, when I use modular extensions, it seems that the main CI application/config autoload.php file won't load sparks. In other words, If I use:

$autoload['sparks'] = array('my_spark/1.0.0');

the spark doesn't seem to load. If anyone has any ideas to solve this, or where I went off track, it would be greatly appreciated!


sparks not loaded when using HMVC - El Forum - 05-18-2013

[eluser]chibuzor[/eluser]
Hi Dam, Your solution works! Thanks a million


sparks not loaded when using HMVC - El Forum - 07-01-2013

[eluser]Unknown[/eluser]
[quote author="Rover" date="1331920766"]Thanks very much for this! It solved most of my problems using Sparks with modular extensions. Now the only problems I have are:

(1) It doesn't seem to load helpers in the spark. If I put the following in the spark config autoload.php:

$autoload['helpers'] = array('test_helper');

it doesn't seem to load the test_helper.php file located in the helpers directory within the spark.

(2) Also, when I use modular extensions, it seems that the main CI application/config autoload.php file won't load sparks. In other words, If I use:

$autoload['sparks'] = array('my_spark/1.0.0');

the spark doesn't seem to load. If anyone has any ideas to solve this, or where I went off track, it would be greatly appreciated![/quote]


I probably have the same problem.

I successfully integrated them, no question about it. But what I noticed is that it can't autoload sparks.

Code:
$autoload['sparks'] = array('php-activerecord/0.0.2');

I'm trying to load the models from its modules/model folder.

From what has been said here, it will automatically find the models inside them. But when I checked if
Code:
isset($CI->phpactiverecord)
, returns failure to autoload.

What do you think happened here?