Showing error 404 Error: Page cannot be found

edited October 2013 in Modules
ufcm.php
-------------------------------------
<?php
$config['nav']['ufcm'] = array(
'ufcm/users' => 'User',
'ufcm/groups' =>'Groups',
'ufcm/facultys'=>'Facultyes',
'ufcm/departments'=>'Departments',
'ufcm/designations'=>'Designations',
'ufcm/addresss'=>'Address',
'ufcm/educations'=>'Educations',
);
---------------------------------
ufcm_routes.php
--------------------
<?php
$ufcm_controllers = array('addresss', 'educations', 'users', 'groups', 'facultys', 'departments', 'designations');
foreach($ufcm_controllers as $c)
{
$route[UFCM_FOLDER.'ufcm/'.$c] = UFCM_FOLDER.'/module';
$route[UFCM_FOLDER.'ufcm/'.$c.'/(.*)'] = UFCM_FOLDER.'/module/$1';
}
$route[UFCM_FOLDER.'ufcm/settings'] = UFCM_FOLDER.'/settings';
------------------------------------------------
ufcm_constants.php
-----------------------------------
<?php
define('UFCM_VERSION', '1.0');
define('UFCM_FOLDER', 'ufcm');
define('UFCM_PATH', MODULES_PATH.UFCM_FOLDER.'/');
------------------------------------------
ufcm_fuel_modules.php
------------------------------------------
<?php
$config['modules']['ufcm_users'] = array(
'module_name' => 'Users',
'module_uri' => 'ufcm/users',
'model_name' => 'ufcm_users_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'first_name',
'user_name',
'email',
'active',
),

'display_field' => 'id',
'preview_path' => 'ufcm/users/{id}',
'permission' => 'ufcm/users',
'instructions' => lang('module_instructions_default', 'ufcm users'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/users',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_groups'] = array(
'module_name' => 'Groups',
'module_uri' => 'ufcm/groups',
'model_name' => 'ufcm_groups_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'title',
'active',
),

'display_field' => 'id',
'preview_path' => 'ufcm/groups/{id}',
'permission' => 'ufcm/groups',
'instructions' => lang('module_instructions_default', 'ufcm groups'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/groups',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_facultys'] = array(
'module_name' => 'Facultyes',
'module_uri' => 'ufcm/facultys',
'model_name' => 'ufcm_facultys_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'title',
'published',
),

'display_field' => 'title',
'preview_path' => 'ufcm/facultys/{id}',
'permission' => 'ufcm/facultys',
'instructions' => lang('module_instructions_default', 'ufcm facultyes'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/facultys',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_departments'] = array(
'module_name' => 'Departments',
'module_uri' => 'ufcm/departments',
'model_name' => 'ufcm_departments_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'title',
'faculty',
'published',
),

'display_field' => 'title',
'preview_path' => 'ufcm/departments/{id}',
'permission' => 'ufcm/departments',
'instructions' => lang('module_instructions_default', 'ufcm departments'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/departments',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_designations'] = array(
'module_name' => 'Designations',
'module_uri' => 'ufcm/designations',
'model_name' => 'ufcm_designations_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'title',
'weight',
'published',
),

'display_field' => 'title',
'preview_path' => 'ufcm/designations/{id}',
'permission' => 'ufcm/designations',
'instructions' => lang('module_instructions_default', 'ufcm designation'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/designations',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_addresss'] = array(
'module_name' => 'Designations',
'module_uri' => 'ufcm/addresss',
'model_name' => 'ufcm_addresss_model',
'model_location' => 'ufcm',
'table_headers' => array(
'id',
'user_id',
),

'display_field' => 'id',
'preview_path' => 'ufcm/addresss/{id}',
'permission' => 'ufcm/addresss',
'instructions' => lang('module_instructions_default', 'ufcm address'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/addresss',
// 'language' => array('ufcm' => 'ufcm')
);

$config['modules']['ufcm_educations'] = array(
'module_name' => 'educations',
'module_uri' => 'ufcm/educations',
'model_name' => 'ufcm_educations_model',
'model_location' => 'ufcm',
'display_field' => 'id',
'preview_path' => 'ufcm/educations/{id}',
'permission' => 'ufcm/educations',
'instructions' => lang('module_instructions_default', 'ufcm educations'),
'archivable' => TRUE,
'configuration' => array('ufcm' => 'ufcm'),
'nav_selected' => 'ufcm/educations',
// 'language' => array('ufcm' => 'ufcm')
);
--------------------------------------------------
--------------------------------------------------

Above are my module config files in config folder

if i go to http://localhost/ufcm/fuel/ufcm/users

IT is showing '404 Error: Page cannot be found'

already all model files placed in models folder

Comments

  • edited 10:46AM
    That sounds like you may have a routing issue. Do you have a route setup for fuel/ufcm/users? This could be done in the application/config/routes.php file. Or if you create an advanced module, you can add it in its config folder. The Blog module uses the following in its fuel/modules/blog/config/blog_routes.php file:
    $blog_controllers = array('posts', 'comments', 'categories', 'links', 'users'); foreach($blog_controllers as $c) { $route[FUEL_ROUTE.'blog/'.$c] = FUEL_FOLDER.'/module'; $route[FUEL_ROUTE.'blog/'.$c.'/(.*)'] = FUEL_FOLDER.'/module/$1'; } $route[FUEL_ROUTE.'blog/settings'] = BLOG_FOLDER.'/settings';
    https://github.com/daylightstudio/FUEL-CMS-Blog-Module
  • edited 10:46AM
    Problem Solved
    Thanks for the Help

    Problem was in route file

    $route[UFCM_FOLDER.'ufcm/'.$c] = UFCM_FOLDER.'/module';

    It should be

    $route[FUEL_FOLDER.'ufcm/'.$c] = UFCM_FOLDER.'/module';

    I miss 'FUEL_FOLDER'
Sign In or Register to comment.