Question

I am New to Joomla, I have Installed JS Jobs Extension in my site

http://dotcomsourcing.com/lercorefinery/

extension successfully installed, but when clicked to open it,shows following error

Fatal error: Class 'JControllerLegacy' not found in /home/dotcom/public_html/lercorefinery/administrator/components/com_jsjobs/controller.php on line 24

help me figure this out.. or tell any other option

Was it helpful?

Solution

The JControllerLegacy class was added in Joomla 2.5.6. Upgrade to that, and you'll be fine. If you're not able to upgrade, you could also define the classes yourself, since they are just a shell that extends JController. However, the recommended way would be to upgrade to at least 2.5.6.

If these classes were added from Joomla 2.5.0, then your classes can simply extend JControllerLegacy, JModelLegacy, and JViewLegacy. However, since these classes are not available before 2.5.6, I think you will need to define a temp class, something like :

if (version_compare(JVERSION, '3.0', 'ge')) {
class LegacyController extends JControllerLegacy {
}
} else {
jimport( 'joomla.application.component.controller' );
class LegacyController extends JController {
}
}

Then the controller class in your extension will extend LegacyController. That should work!

Another simpler solution would be to find/replace

JControllerLegacy, JModelLegacy, JViewLegacy

with

JController, JModel, JView

in your plugin's folder by using Notepad++ or any other IDE of your choice.

That's it..!! Enjoy :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top