?
avatar infograf768
infograf768
10 Apr 2020

Steps to reproduce the issue

Make a clean install of j4-dev

Edit Admin Menu (Administrator Menu module)

Expected result

The Preset displayed in the Choose Preset field should be Preset - Joomla Main Menu
But it is Preset - Content Dashboard, although it is indeed the Joomla Main Menu which is used.
If one does not care and just modify something else than the Preset and save, one loses the admin menu in back-end...

Actual result

Screen Shot 2020-04-10 at 10 26 53

As the sql to create this administrator mod_menu does not specify the Preset in the params
(0, 'mod_menu', 'module', 'mod_menu', '', 1, 1, 1, 0, 1, '', '', 0, NULL, 0, 0),
My guess is that the field displays the default alpha ordered Preset which is Content Dashboard

Any idea?

avatar infograf768 infograf768 - open - 10 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Apr 2020
avatar richard67
richard67 - comment - 10 Apr 2020

Maybe it is set in script.php but not in the right way? Or maybe it should be set in script.php?

avatar infograf768
infograf768 - comment - 10 Apr 2020

It is important though that the default be used only once and not modified after each J4 upgrade.

avatar infograf768
infograf768 - comment - 11 Apr 2020

@richard67
I found a solution by adding a default to the field.

				<field
					name="preset"
					type="menuPreset"
					default="default"  // Added
					label="MOD_MENU_FIELD_PRESET_LABEL"
					description="MOD_MENU_FIELD_PRESET_DESC"
					showon="menutype:*"
				/>

which gives
Screen Shot 2020-04-11 at 11 29 03

What do you think?

avatar richard67
richard67 - comment - 11 Apr 2020

Looks good.

avatar infograf768 infograf768 - change - 11 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-11 09:48:31
Closed_By infograf768
avatar infograf768
infograf768 - comment - 11 Apr 2020

Please test #28640
closing as we have patch

avatar infograf768 infograf768 - close - 11 Apr 2020

Add a Comment

Login with GitHub to post a comment