J4 Issue ?
avatar brianteeman
brianteeman
27 Aug 2019

None of the module options shown below work

image

avatar brianteeman brianteeman - open - 27 Aug 2019
avatar joomla-cms-bot joomla-cms-bot - change - 27 Aug 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Aug 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Aug 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 28 Aug 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Aug 2019
Status New Discussion
avatar Quy
Quy - comment - 11 Nov 2019

Switch to Preset - Alternative Main Menu. The last two options work.

avatar infograf768
infograf768 - comment - 11 Nov 2019

The only place where I see "Add New Shortcuts" parameter (shownew field name) used is in
/administrator/modules/mod_menu/Menu/CssMenu.php line 290

			// Whether this scope can be displayed. Applies only to preset items. Db driven items should use un/published state.
			if (($item->scope === 'help' && $this->params->get('showhelp', 1) == 0) || ($item->scope === 'edit' && !$this->params->get('shownew', 1)))
			{
				$parent->removeChild($item);
				continue;
			}

I have absolutely no idea of its usage.

avatar brianteeman
brianteeman - comment - 11 Nov 2019

It was used in j3. It does nothing in j4

avatar infograf768
infograf768 - comment - 11 Nov 2019

Concerning showhelp, as it is only useful for the alternate preset I propose a modification of the xml by adding some showon

				<field
					name="showhelp"
					type="radio"
					label="MOD_MENU_FIELD_SHOWHELP"
					class="switcher"
					default="1"
					filter="integer"
					showon="preset:alternate[AND]menutype:*"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="forum_url"
					type="url"
					label="MOD_MENU_FIELD_FORUMURL_LABEL"
					description="MOD_MENU_FIELD_FORUMURL_DESC"
					filter="url"
					size="30"
					default=""
					showon="showhelp:1[AND]menutype:*"
					validate="url"
				/>

What do you think?
At the same time we could get rid of the shownew field and its lang string.

avatar Quy
Quy - comment - 11 Nov 2019

Switch to Alternate Main Menu and enable Help Menu. Switch to Joomla Main Menu. Custom Support Forum URL should not display.

26050

avatar Quy
Quy - comment - 11 Nov 2019

Is Add New Shortcuts for the + icon in the menu? If yes, this option would be nice to have to hide/show.

avatar infograf768
infograf768 - comment - 11 Nov 2019

It is not the case in j4. I think it was used to get the Add New Article (and similar) in J3 (I am not on my desktop right now)
In J4 we get the + in the presets xmls with quicktask. See my recent PR.

Switch to Joomla Main Menu. Custom Support Forum URL should not display.

Will test again the showon in my code above

avatar infograf768
infograf768 - comment - 12 Nov 2019

In fact we can just modify CssMenu.php by adding the help link from the default preset to switch help also for Preset -Joomla Main Menu

			elseif ($item->link === 'index.php?option=com_cpanel&view=help'
				|| $item->link === 'index.php?option=com_cpanel&view=cpanel&dashboard=help')
			{
				if ($this->params->get('showhelp', 1))
				{
					continue;
				}

				// Exclude help menu item if set such in mod_menu
				$parent->removeChild($item);
				continue;
			}

Will make patch.

Let's deal with shownew, if possible to get that parameter where we need it, i.e when quicktask is defined, for another patch.

avatar brianteeman
brianteeman - comment - 12 Nov 2019

The alternative is to decide if these options are really needed and therefore reduce the number of options in Joomla by simply removing them. Just because they were present in J3 doesnt mean they have to be in j4

avatar infograf768
infograf768 - comment - 12 Nov 2019

Please test
#27052

I am not closing this because the shownew issue remains to solve.

avatar infograf768
infograf768 - comment - 12 Nov 2019

The alternative is to decide if these options are really needed and therefore reduce the number of options in Joomla by simply removing them. Just because they were present in J3 doesnt mean they have to be in j4

Why not also get rid of all this dashboard confusing stuff with its multiple complex configurations?
Seriously: displaying or not the help and being able to add a custom forum url are useful.

avatar brianteeman
brianteeman - comment - 12 Nov 2019

I agree about the custom forum URL but why would you really want to hide the help,? You could always create a custom menu if it's needed.

Most options were introduced to avoid making a decision. This is why we have so many and such a complicated UI.

We should be brave and make decisions.

avatar infograf768
infograf768 - comment - 12 Nov 2019

Concerning shownew, I found a solution.
We can use

if ($current->getParams()->get('menu-quicktask', false) && $this->params->get('shownew', 1) === 1)
{
etc.
avatar brianteeman
brianteeman - comment - 11 Jan 2020

Note for myself
Show Help - now works correctly

will look at the other two later today

avatar brianteeman
brianteeman - comment - 12 Feb 2020

Only the custom help menu doesn't work now

avatar brianteeman brianteeman - change - 23 Dec 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-12-23 22:18:34
Closed_By brianteeman
avatar brianteeman brianteeman - close - 23 Dec 2020
avatar brianteeman
brianteeman - comment - 23 Dec 2020

see #31774

Add a Comment

Login with GitHub to post a comment