Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

undefined function Test::all() when using hmvc #16

Closed
isimmons opened this issue Aug 12, 2012 · 3 comments
Closed

undefined function Test::all() when using hmvc #16

isimmons opened this issue Aug 12, 2012 · 3 comments

Comments

@isimmons
Copy link

Hi,

I've installed the spark with regular CI 2.1.2 and it works perfectly.

But on a fresh install using the hmvc install instructions on the sparks install page and then installing phpar spark I get Fatal: undefined function Test::all();
Here's my setup

Application
--------------modules
--------------------------test
-------------------------------controllers
-----------------------------------------test.php
-------------------------------models
----------------------------------------Test.php

If I try without phpar the module works echoing out a "hello from test module"

So when I run phpar spark or hmvc on their own they both work as they should but when I put them together in the same app this undefined message is all I get. Here's the stacktrace from xdebug

Time Memory Function Location

1 0.0003 338504 {main}( ) ..\index.php:0

2 0.0008 339416 require_once( 'E:\sandbox\ciblog2\system\core\CodeIgniter.php' ) ..\index.php:202

3 0.0103 748936 call_user_func_array( ) ..\CodeIgniter.php:359

4 0.0103 748984 Test->index( ) ..\CodeIgniter.php:359

@isimmons
Copy link
Author

Googling for this "codeigniter "2.1.2" hmvc sparks" it looks like there are others having the issue with other sparks. Apparently something is causing sparks not to load right. So sorry, I don't think the issue is with phpar.

@machuga
Copy link
Owner

machuga commented Aug 13, 2012

@isimmons Correct - it's an issue with hmvc and sparks. You must merge the two MY_Loader files - cannot overwrite. You need bits from each.

@machuga machuga closed this as completed Aug 13, 2012
@isimmons
Copy link
Author

Yeah actually it's something else. Same thing with no sparks installation at all just trying to run a hello world function from a model in a module. I'm looking on the ci forum for help. But definitely not phpar. Thanks for the reply.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants