? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
9 Feb 2020

Pull Request for Issue #27765.

This tackles the issue that 3rd party components couldn't easily have presets menus (eg for the dashboard) like core components have.

Summary of Changes

Currently, the list of presets is hardcoded in the menuhelper. This PR changes this to a dynamically loaded list. It looks in each enabled component if there is a presets folder and loads all XML presets found there.
This also moves the existing component specific presets for com_content and com_users to their respective component folder, instead of having them in com_menus.
The language strings are taken out from mod_menu.ini and lib_joomla.ini and moved to the place where the corresponding presets lives, so either com_content, com_users or com_menu (for the "system" ones).

Testing Instructions

After applying the PR, check that the menu (main and alternative) and the various dashboards still work as expected.
To test 3rd party, you can copy an existing preset file to a 3rd party component and renamed it. Then see if it shows up in the presets list in the "Administrator Menu" and "Administrator Dashboard Menu" modules.
Or you can use my component and see if the "SermonSpeaker Dashboard" Preset comes up there.
com_sermonspeaker.zip

Expected result

Presets are loaded from component folders as well and all component specific assets (preset, language strings) are contained in the component folder.

Actual result

Presets are hardcoded in com_menus. Language strings reside in lib_joomla and mod_menu.

Documentation Changes Required

Probably in the 4.0 Component development guide.

avatar Bakual Bakual - open - 9 Feb 2020
avatar Bakual Bakual - change - 9 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2020
Category Administration com_content com_menus com_users Language & Strings
avatar Bakual Bakual - change - 9 Feb 2020
Title
40 load presets from component directory
[4.0] Load presets from component directory
avatar Bakual Bakual - edited - 9 Feb 2020
avatar Bakual
Bakual - comment - 9 Feb 2020

One thing to think about is that all presets are currently using the same "namespace" (for lack of a better word). Which means if another component uses the same preset name as another (eg "default"), the first one gets overwritten.
However that is already the case today as you can register own presets programmatically using eg a plugin.
Thus I thought it's out of scope for this PR.

avatar chmst chmst - test_item - 10 Feb 2020 - Tested successfully
avatar chmst
chmst - comment - 10 Feb 2020

I have tested this item successfully on f81879a

Tested with an own component.

After test, the Warning for missing parts of the menu of my own componente is incomplete: "The administrator menu jottovoter does not have - Menu Manager. Select to turn on the menu recovery mode." - Does not have what?
EDIT: Message is not incomplete but confusing.

But this is out of scope of this PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27869.

avatar jwaisner jwaisner - test_item - 10 Feb 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 10 Feb 2020

I have tested this item successfully on f81879a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27869.

avatar jwaisner jwaisner - change - 10 Feb 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 10 Feb 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27869.

avatar rdeutz rdeutz - change - 11 Feb 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-02-11 07:12:57
Closed_By rdeutz
Labels Added: ? ?
avatar rdeutz rdeutz - close - 11 Feb 2020
avatar rdeutz rdeutz - merge - 11 Feb 2020

Add a Comment

Login with GitHub to post a comment