Saturday, April 24, 2010

Fixing "Component Not Found" - joomla

Ok last time we got following error

let see how to solve this issue. Issue say about "Component Not Found". That means there is no such a component on our code.

ple go folder structure
administrator ->components->com_lanka1

There is only 2 files [index.html / install.xml]. From now, we have to develop MVC structure base coding.

First File you need to add "com_lanka1" folder is "lanka1.php" And code show as follows

* com_lanka default controller
* @package Joomla.component
* @subpackage Components
* @link
* @license GNU/GPL
* @auth inetlanka web team - [ / ]

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

// Require the base controller

require_once( JPATH_COMPONENT.DS.'controller.php' );

// Require specific controller if requested
if($controller = JRequest::getWord('controller')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';

// Create the controller
$classname = 'Lanka1sController'.$controller;
$controller = new $classname( );

// Perform the Request task
$controller->execute( JRequest::getVar( 'task' ) );

// Redirect if set by the controller

then try to again brows
"http://YOUR JOOMLA PATH/administrator/index.php?option=com_lanka1"

It is must, showing above error on your web page. other wise there is another issue on ur code

next time we will fix this issue


No comments:

Post a Comment