Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.
Font size: +

Experiences with Joomla 3.0 Issue Tracker component

2. Seems that JController::getInstance is no longer around. Need to use JControllerLegacy instead.

The old JController, JModel and Jview classes have been renamed to JControllerLegacy etc.

The ‘new’ JController,Jview, JModel are now classes in the new MVC implementation.

The solution is to use the legacy classes.

The following code does work:

$jversion = new JVersion();
if( version_compare( $jversion->getShortVersion(), '2.5.6', 'lt' ) ) {
$controller = JController::getInstance('IssueTracker');
else {
$controller = JControllerLegacy::getInstance('IssueTracker');
}

However there are numerous places particularly with class definition where we refer to JController, JView and JModel where such a construct will not work which will all require changing.

So in the situation of a moving 2.5 extension to 3.0, we have to

1. modify JController::getInstance to JControllerLegacy::getInstance in master component file.

2. modify extends JController to JControllerLegacy in master/default controller.

3. modify extends JView to JViewLegacy in all view classes.

In general case, we have to change JController to JControllerLegacy, JModel to JModelLegacy and JView to JViewLegacy.

3. JHtmlBehavior::mootools not found.

Use JHtmlBehavior::framework instead.

This includes constructs such as : JHTML::_('behavior.mootools'); which becomes: JHTML::_('behavior.framework');

4. A few database class routines have changed.

Instead of $db->nameQuote we have to use $db->quoteName

and instead of $db->getEscaped we use $db->escape

5. The library routine jgrid has moved its directory. It was formally in libraries/joomla/html/html/jgrid.php

It is not located in libraries/joomla/html/jgrid.php.

6. Our templates do not display nicely in the Isis template with a lot of items overlapping. Need to rework the our displays. Hathor template looks OK (as far as it goes!) Seems that the adminlist class has been replaced with the table class (from code inspection). Also the 'btn-group' class has replaced classes such as filter-select, and there are pull-right and pull-left classes as well instead of fltlft and fltrgt.

7. Need to change the issuetracker css classed itroduced to permit colour priorities.

8. JDate::toMysql() has been removed. Use JDate::toSql() instead.

Change: $get_date= JFactory::getDate();

$date=$get_date->toMysql();

To: $get_date=JFactory::getDate();

$date=$get_date->toSql();

9. JUtility::sendMail() has been removed. Use JMail::sendMail() instead.

10. JUtility::sendAdminMail() has been removed. Use JMail::sendAdminMail() instead.

11. JDatabase::query() is deprecated, use JDatabaseDriver::execute() instead.

Change: $db->query();

To: $db->execute();

12. JFile::read is deprecated. Use native file_get_contents() syntax.

Change: $smileysfile= JFile::read(JPATH_COMPONENT . DS . 'smileys.txt');

To: $smileysfile=file_get_contents(JPATH_COMPONENT.DS.'smileys.txt');

13. JRequest is deprecated. Use JFactory::getApplication()->input

See: http://docs.joomla.org/Retrieving_request_data_using_JInput

Change: $post=JRequest::get('post');

JRequest::getVar('badwords');

To: $input =JFactory::getApplication()->input;

$post=$input->post;

$input->post->get('badwords')

 

Change: $task= JRequest::getVar('task');

To: $task=$input->get('task');

 

Change: $groupid= JRequest::getVar('id');

To: $groupid=$input->get('id');

 

Change: $limitstart=JRequest::getVar('limitstart', 0, '', 'int');

To: $limitstart=$input<->get('limitstart','0','INT');

 

Change: $controller=JRequest::getWord('controller');

To: $controller=$input->get('controller');

 

Change: $controller->execute(JRequest::getCmd('action'));

To: $controller->execute($input->get('action'));

 

14. JViewLegacy::assignRef is deprecated. Use native PHP syntax.

Change:  $this->assignRef( 'userlist', $userlist);

To:  $this->userlist=$userlist

 

Amazon and Apple close security hole.
Dangers of having your data in the cloud.
 
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries