3
votes

I had ReDJ plugin v 1.6 working on 2.5 Joomla site. But I'm moving on Joomla 3 and this module don't work now - exception errors appears. In change-logs I found this: Changed class names for ALL models, controllers and views. So I simply add Legacy suffix to all classes that handles exceptions. And also change JRequest (it is deprecated in v3) on $input=JFactory::getApplication()->input;.

So for now, seems like all is working fine. Except.. component admin panel - i can see component menu, but there is no any content on page. Here is screenshot: http://tinyurl.com/btfzxux

Main controller controller.php code: http://pastebin.com/vQjYvYkK
Main component file redj.php code: http://pastebin.com/gF6icdE3


I found that dont work line parent::display(); in controller.php file. And there is no error in logs and display.
And this line calls JControllerAdmin->display() which is:

/**
 * Display is not supported by this controller.
 *......................
 *......................
 */
public function display($cachable = false, $urlparams = array())
{
    return $this;
}

So nothing displayed. I tried to rename extends definition as JControllerLegasy (because it supports display() method), but still nothing in component output.


How can i output component content in admin panel in Joomla 3?

Any help appreciated.
S.G.


UPDATE 1:

I publish my code on GitHub. I'm tying to optimize this plugin for Joomla 3. Any help welcome! https://github.com/staniaslavg/ReDJ

P.S. Now redirection list displays and adding a new one works fine. But.. there is no items in item list.


UPDATE 2:

Finally, everything works fine (tested jnly by me, but seems like everything is OK..)

P.S. If nothing displays in tabs - check for DataBase columns. I added a few more. Check whis by var_dump errors variable (like $this->get('Errors')) in files views/.../view.html.php

Code on GitHub: https://github.com/staniaslavg/ReDJ

1
@ValentinDespa as I said: in change-logs I found.. So i really read all that changes and fix all issues.StasGrin
Did you also rename JView in JViewLegacy?Valentin Despa
@ValentinDespa Yes, I am sure, that i rename all classes with "Legacy".StasGrin
Share your whole code on github so that I can see everything. If we get it fixed, maybe others are also interested and the maintainer will merge it.Valentin Despa

1 Answers

2
votes

I've posted some updates in the github repo, to show that it's possible to get it working. (for the redirects view sequence). Unforunately some code used in Joomla! 2.5 by the component was already deprecated and was removed in 3.0. Also the GUI looks bad in 3.0, it needs more work.

As much as I would like to help you to get it running, the time involved it huge. I would strongly suggest using Joomla! 2.5 which is still for a good period supported.

Also the developer announces that a Joomla! 3.0 version is underway.

Going over all the code and fixing it makes little sense for me, but here are some examples:

JDatabase::getEscaped() has been removed. Use JDatabase::escape() instead.

$db->getEscaped($orderCol.' '.$orderDirn)

=> $db->escape($orderCol.' '.$orderDirn)

JToolBar no longer supports the 'X' functions (eg, addNewX, editListX) that hide the main menu before doing the function.

and others.