#1 2014-01-27 10:03:31

festus
Member
Registered: 2014-01-27
Posts: 20

controller cannot find model class in a module

i am new to ionize, i copied the folder of the modules used in my previous project to the new project and i am getting the error below from my admin panel. can someone please tell me what is wrong that the controller can't find the model class.
Fatal error: Class 'modules\Gallery\models\Gallery' not found in D:\INTERPROMOTION.COM\www.ciasaroch.com\modules\Gallery\controllers\admin\gallery.php on line 45

Offline

#2 2014-01-27 10:06:22

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: controller cannot find model class in a module

Your controller could not find your model file, be sure you loaded model before call it... Check your line 45...


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#3 2014-01-27 10:11:05

festus
Member
Registered: 2014-01-27
Posts: 20

Re: controller cannot find model class in a module

yes i loaded the model with this code in line 45, $gallery = Models\Gallery::find($gallery_id);

Offline

#4 2014-01-27 10:14:18

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: controller cannot find model class in a module

Can you use it like :

$this->load->model('Your_model', 'my_model', TRUE);
$this->my_model->find($gallery_id);

<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#5 2014-06-10 11:49:28

festus
Member
Registered: 2014-01-27
Posts: 20

Re: controller cannot find model class in a module

yes, but that is not the problem, it seems its a problem with ionize 1.0.6. first in ionize 1.0.5 it was a problem of get array set to FALSE at the application/config/config file but now even after setting it to TRUE it doesn't work.

Fatal error: Class 'modules\Externallinks\models\LinkCategory' not found in D:\INTERPROMOTION.COM\www.cesa-padon.it\modules\Externallinks\controllers\admin\externallinks.php on line 20

Offline

#6 2015-05-08 10:13:51

ngochuynh1608
Member
Registered: 2015-04-20
Posts: 5

Re: controller cannot find model class in a module

i cant call function controller module


Cơ sở sản xuất ghế đá | ghe da Thiên An | Khách sạn tam kỳ

Offline

#7 2015-05-08 10:24:35

ngochuynh1608
Member
Registered: 2015-04-20
Posts: 5

Re: controller cannot find model class in a module

i cant call function controller module


Cơ sở sản xuất ghế đá | ghe da Thiên An | Khách sạn tam kỳ

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations