? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
12 Jan 2015

This PR sorts the menutypes in the backend in alphabetical order and not in order how they were first created some ancient time ago. πŸ˜‰

How to test

  1. Go into the backend, open the "Menus" menu and see that it is not ordered alphabetically.
  2. Apply change.
  3. See that the menus are now ordered alphabetically.
avatar Hackwar Hackwar - open - 12 Jan 2015
avatar jissues-bot jissues-bot - change - 12 Jan 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 12 Jan 2015
Category Administration UI/UX
avatar zero-24 zero-24 - change - 12 Jan 2015
Easy No Yes
avatar richard67
richard67 - comment - 12 Jan 2015

@test Success.
screen shot 2015-01-12 at 14 14 00


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar richard67 richard67 - test_item - 12 Jan 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Jan 2015

I get the following error

Strict Standards: Only variables should be passed by reference in /Applications/MAMP/htdocs/joomla-cms-staging/administrator/modules/mod_menu/tmpl/default_enabled.php on line 142


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar brianteeman brianteeman - test_item - 12 Jan 2015 - Tested unsuccessfully
avatar richard67
richard67 - comment - 12 Jan 2015

Ooops: I have the same, haven't seen it when testing before (blush).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar richard67 richard67 - test_item - 12 Jan 2015 - Not tested
avatar richard67 richard67 - test_item - 12 Jan 2015 - Tested unsuccessfully
avatar Hackwar
Hackwar - comment - 12 Jan 2015

Sorry, fixed that one. I even looked at the source of JArrayHelper::sortObjects() and saw the reference, but missed it...

avatar richard67
richard67 - comment - 12 Jan 2015

@test Success. Works now without PHP warnings after correction.
What would be perfect of course wold be to have an ordering column for the menus, as we have for the menu items, and show them in this order in the menu (which can be modified by drag and drop in the menu manager).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar richard67 richard67 - test_item - 12 Jan 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Jan 2015

@test the Strict standards issue has now been fixed.

I now see that this change isnt applied in Hathor. Not sure if that uses an override ?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar richard67
richard67 - comment - 12 Jan 2015

@brianteeman Yes, I just see Hathor has an override mod_menu/default_enabled.php.
@test I've forgotten Hathor (blush).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar richard67 richard67 - test_item - 12 Jan 2015 - Tested unsuccessfully
avatar infograf768
infograf768 - comment - 13 Jan 2015

Not sure I like this one. In my multilingual test site, the menus which were created one language after the other are now disordered.

Also, the sorting done in this PR is different in mod_menu vs the dropdown in "Menu Manager: Menu items"
In mod_menu all menus starting with a Capital letter are grouped first, not in the dropdown where it it is not case sensitive, i.e.

mod_menu
Mainmenu
Top menu
[...]
my menu
toys menu

Dropdown
Mainmenu
my menu
[...]
Top menu
toys menu

If it was decided to alpha sort the menus, the second solution is much better imho

can be used instead, to solve at least the case sensitive issue (IF we sort alpha)
$menuTypes = JArrayHelper::sortObjects($menuTypes, 'title', $direction = 1, $caseSensitive = false, $locale = true);
or, shorter
$menuTypes = JArrayHelper::sortObjects($menuTypes, 'title', 1, false, true);

we would get

screen shot 2015-01-13 at 09 04 27

instead of

screen shot 2015-01-13 at 09 14 18

changing locale to false has apparently no effect here.

avatar Hackwar
Hackwar - comment - 13 Jan 2015

I've changed the sorting to be case-insensitive and added the change to Hathor, too. I also first thought I enabled the local-aware sorting, but then noticed that that feature is actually implemented pretty stupidly... I would have to hand in the locale by which to sort and not simply true or false and quite frankly, the amount of code that would have to be written to do this properly is simply not worth the gain we maybe would get. As far as I can see, it would only make sure that letters like o and ΓΆ would be grouped next to each other in German for example. However, I think that it already orders via UTF8 and I guess that that takes care of this already anyway... Mind you, that is not based on hard facts, but a hunch. :wink:

In any case, I guess this is now ready for final testing/merging, depending on if this is actually a wanted feature. However, if we don't do this, we should remove the ordering in the menu manager filter dropdown to keep this consistent.

avatar infograf768
infograf768 - comment - 13 Jan 2015

I agree it should be consistent, thus why I proposed the code.

avatar brianteeman
brianteeman - comment - 13 Jan 2015

@test all works well for me - thanks for this @Hackwar

However, if we don't do this, we should remove the ordering in the menu manager filter dropdown to keep this consistent.

I dont see this filter?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.
avatar brianteeman brianteeman - test_item - 13 Jan 2015 - Tested successfully
avatar Hackwar
Hackwar - comment - 13 Jan 2015

if you go into the list view of a menu in the menu manager, you can switch between the menus that are displayed. That is the dropdown that I'm talking about.

avatar brianteeman
brianteeman - comment - 13 Jan 2015

Ah gotcha
On 13 Jan 2015 10:18, "Hannes Papenberg" notifications@github.com wrote:

if you go into the list view of a menu in the menu manager, you can switch
between the menus that are displayed. That is the dropdown that I'm talking
about.

β€”
Reply to this email directly or view it on GitHub
#5683 (comment).

avatar brianteeman brianteeman - alter_testresult - 13 Jan 2015 - richard67: Tested successfully
avatar infograf768
infograf768 - comment - 14 Jan 2015

Fine here. Merging. Thanks.

avatar infograf768 infograf768 - close - 14 Jan 2015
avatar infograf768 infograf768 - change - 14 Jan 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-01-14 09:10:51

Add a Comment

Login with GitHub to post a comment