[1024] could not find model

Could not find model [model_name] it was occured when model file cannot be loaded from controller.

Example error message

File: /Applications/XAMPP/xamppfiles/htdocs/seme-framework/kero/sine/SENE_Controller.php

Line: 156

Error: [1024] could not find model hello_model on /Applications/XAMPP/xamppfiles/htdocs/seme-framework/app/model/hello_model.php

Solution

Here is some options that can be done for solving this error.

Check the file name

Please make sure:

  1. The file name are correct,
  2. Filename are in lower case,
  3. There is no spaces between dot and extension name, and
  4. There is only alphanumeric and underscore allowed.

Check the class name

Please make sure:

  1. The file name are equal with class name but the case is ignored,
  2. Classname can be camel case or in mixed case with the first letter of each internal word capitalized
  3. There is only alphanumeric and underscore allowed,
  4. There is no space or special char on class name.

Check the class loader on Controller

Model are loaded in Controller through load method. Please make sure:

  1. The location of file and file name is correct,
  2. The alias are correct.