Part of the EllisLab Network
   
3 of 25
3
Modular Extensions - HMVC version 5.4
Posted: 26 March 2011 02:55 AM   [ Ignore ]   [ # 21 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007
DBPolito - 26 March 2011 03:05 AM

Hello,

I’ve found a bug with languague autoloader. Sorry but i don’t have the details here, but will be nice if you take a look on it. I just remember that have a wrong param on calling the CI::lang->language(), i’ve fixed the param but still not working.

...

There is no language method in the CI_Lang class.

 Signature 

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

Profile
 
 
Posted: 27 March 2011 11:30 PM   [ Ignore ]   [ # 22 ]  
Summer Student
Total Posts:  7
Joined  10-31-2010

Sorry if this is a case of me needing to read more.. but:

Trying to autoload[‘language’] = array(‘sa’);

ends up with the error message: Unable to load the requested language file: language/english/Array_lang.php

Autoloaded helpers and libraries are fine though.

Changing the controller from MY_ to CI_ makes it work..


edit: Made a “MY_controller extends MX controller” with $this->lang-load() in its __construct() and seems to work fine.

In the controller I’m using “home extends MY_controller” I can get a lang->line() out of it.

Profile
 
 
Posted: 28 March 2011 01:59 AM   [ Ignore ]   [ # 23 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

@RGM_, Autoload language is working fine here.

 Signature 

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

Profile
 
 
Posted: 28 March 2011 09:57 AM   [ Ignore ]   [ # 24 ]  
Summer Student
Total Posts:  9
Joined  12-08-2009

I think this problem happening only at Reactor Version.

Profile
 
 
Posted: 28 March 2011 03:41 PM   [ Ignore ]   [ # 25 ]  
Summer Student
Total Posts:  7
Joined  10-31-2010

Updated to 2.0.1 from codeigniter.com it still comes up with array.

Using wrong version?

Profile
 
 
Posted: 30 March 2011 12:09 PM   [ Ignore ]   [ # 26 ]  
Summer Student
Total Posts:  6
Joined  01-30-2011
RGM_ - 28 March 2011 03:30 AM

...
Trying to autoload[‘language’] = array(‘sa’);

ends up with the error message: Unable to load the requested language file: language/english/Array_lang.php

Autoloaded helpers and libraries are fine though.

...

edit: Made a “MY_controller extends MX controller” with $this->lang-load() in its __construct() and seems to work fine…

I’m having this problem too, or at least a similar one. I’m using CI 2 (not Reactor). When trying to use the regular autoload for loading a language, I am presented with the same error as above. The autoload files in the modules directories are working fine for me.

When I remove the language load from the original autoload en place a $this->lang->load() in the constructor of my MY_Controller, everything work fine.

Profile
 
 
Posted: 03 April 2011 04:20 AM   [ Ignore ]   [ # 27 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  650
Joined  11-18-2008

First off, thanks for MX. Your hard work is appreciated.

I have a quick question. Can Modules contain more than 1 controller each? I tried to add a second controller to a module and it doesn’t seem to be working.

I first created a ‘movies’ module, and inside it’s controllers directory, I put in a ‘movies’ controller. I went to

http://my.domain.tld/movies 

and everything worked fine. But then I added a ‘actors’ controller, and tried to go to

http://my.domain.tld/movies/actors 

it didn’t work. I then tried to go to

http://my.domain.tld/movies/actors/index 

and it didn’t work either. When I added a ‘actors’ method to the ‘movies’ controller, that worked without a problem.

My setup is:

app
—/controllers
—/core
—/—/MY_Controller.php (extends MX_Controller)
—/[other stuff]
—/models
—/modules
—/—/movies
—/—/—/controllers
—/—/—/—/movies.php (extends MY_Controller)
—/—/—/—/actors.php (extends MY_Controller)
—/—/—/models
—/—/—/views
—/views

Am I doing something wrong?

EDIT: I forgot to mention that I am using MX 5.4, alongside DMZ 1.8 (in case that helps any)

 Signature 

Quality Coder | Looking for work? | Logo by InsiteFX

Profile
 
 
Posted: 03 April 2011 05:04 AM   [ Ignore ]   [ # 28 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  650
Joined  11-18-2008

disregard previous post. I’m an idiot tongue laugh

 Signature 

Quality Coder | Looking for work? | Logo by InsiteFX

Profile
 
 
Posted: 05 April 2011 09:09 PM   [ Ignore ]   [ # 29 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  347
Joined  08-19-2008

Hey wiredesignz. First, this is great work, I’ve been using your system for a long time, maybe a couple years, I’ve got it integrated into my CMS and it works b.e.a.utifully… however…

I just ran into an issue. My CMS is sort of a fallback system so that basically if the router doesn’t find a controller for the current URI, then it checks the CMS, and if it finds a page, it loads it, otherwise it returns a 404. The issue is, I have a page in the CMS with the slug ‘blog’, and then a module named ‘blog’. The blog page uses the blog module, naturally, but since the CMS is checked AFTER the router does it’s thing, it’s trying to load the content from the blog module. My question is, is there a way to disable the code that loads a module based on the URI, without breaking anything? Essentially for this project, I never want it to load a module right from the URI, I want it to either use an existing controller, or use the CMS.

Thanks!

Edit: I know the easiest thing to do would be either rename the page slug (which I’ve done in the mean time) or rename the module, but the issue is it’s possible with my system that someone could name something the same as a module, and then break their site. I just want to try and make it so that isn’t possible.

Profile
 
 
Posted: 06 April 2011 12:15 AM   [ Ignore ]   [ # 30 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

@darkhouse, You could try using a catchall route sending everything to your default controller and use the _remap() method to sort out the URL.

$route['(.*)'$route['default_controller'].'$1'
 Signature 

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

Profile
 
 
   
3 of 25
3