User tests: Successful: Unsuccessful:
As reported in Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33314
$originalOrders var is only set if Tags exist -- moved $originalOrders = array() to earlier in code where other fields are initialized.
Good point. I hadn't looked to see if/where it was used. Confirmed it is not referenced anywhere else in com_tags. Updated the PR to remove the 2 lines using it.
This comes from the old ordering system. I think we can remove it from everywhere and also clean saveOrder
from controllers because now saveOrderAjax
calls itself to models.
Thanks Roberto. I was just looking at that. This older version is still used in Tags, Menus and Categories. I will update this to remove $originalOrders from the views of all 3 as well as removing saveorder() from their controllers.
Have a look at hathor overrides as well. I think I saw that there was some value saved in that for categories and menus. It's likely that it can be removed as well.
@phproberto - Does this mean we can remove the Joomla.orderTable function in the view files also?
@radiant-tech @phproberto It may be wise to not remove saveOrder
but deprecate it instead. You never know if a crazy developer used it somewhere.
I wouldn't call it that crazy. I think quite a few people aren't happy with the AJAX ordering so have stuck with the 2.5 system. Definitely don't think we should remove it
saveorder() in the Categories and Menu Items controllers just checks whether any ordering has changed (the originalOrders var in the view file and passed through post as 'original_order_values') and then passes control to saveorder() in JControllerAdmin.
Removing it from these components just takes out that extra step, so no harm, right?
It's a public function which can in theory be used by other extensions. Also other extensions may have extended this class for whatever reasons.
Leave the function there, but mark it as deprecated and log the usage using JLog.
Since it isn't used anymore by the core extensions itself, it will be just a bit of code which is there. We will remove it with 4.0.
Hi Denise,
The problem comes when there are no tags in the CMS means if you haven't created any tags before and you are trying to create it for the first time it comes up. So at the line 235 when you try to echo $orignal orders if you can check whether the variable is not null which is the array, it works fine. So we aren't removing $originalOrders variable but just handling it in the echo statement checking whether the variable is null.
Oh i see. Thanks will do some testing on the Pull request.
Tested successfully.
Thanks!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-04-17 12:58:34 |
Title |
|
Title |
|
I wonder if this is even used for anything. Looks to me like it is set as an empty array in the view and will never be populated with a value. Most likely it's leftover code which could be removed safely.