No Code Attached Yet J3 Issue
avatar artur-stepien
artur-stepien
23 May 2018

Steps to reproduce the issue

  • Create menu consisting of URL type items and its subitems (that is important)
  • Go to Modules -> New -> Menu
  • Try to select in Base item any of the submenu URL type items you added in first step

Expected result

Able to select URL type menu item as Base item

Actual result

Menu item is inactive

System information (as much as possible)

Joomla! 3.8.8

Additional comments

That prevents from building menu module that consists of url type links from other menu.
The only way now is to create another menu so you will not need to select Base item but that also leads to content duplicates and doubles managed time.

avatar artur-stepien artur-stepien - open - 23 May 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 May 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 May 2018

can you please give Info about used Template as i found #19562 for Example.

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 May 2018
Status New Information Required
avatar brianteeman
brianteeman - comment - 24 May 2018

@franz-wohlkoenig completely different issue.

I can confirm that it is not possible to select a menu item of type url as the base item for a menu module

avatar artur-stepien
artur-stepien - comment - 24 May 2018

@franz-wohlkoenig It is default template. Who changes it those days?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 May 2018

@artur-stepien @brianteeman thanks for Info.

avatar brianteeman brianteeman - change - 25 May 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 May 2018
avatar infograf768
infograf768 - comment - 25 May 2018

Is that really an issue? I kind of remember it was done on purpose, but it "could" be that the reason was to prevent that specific type of links to be used for associations when selected in the modal. Now that the modal is also used elsewhere, some tests have to be done of its impact.

avatar brianteeman
brianteeman - comment - 25 May 2018

yes it is really an issue.

avatar artur-stepien
artur-stepien - comment - 25 May 2018

So maybe just add a parameter that disabled URL type menu items.

avatar infograf768
infograf768 - comment - 25 May 2018

The code is
<?php $uselessMenuItem = in_array($item->type, array('separator', 'heading', 'alias', 'url', 'container')); ?>

and then the link is presented with that conditional

							<?php if (!$uselessMenuItem) : ?>
								<a class="select-link" href="javascript:void(0)" data-function="<?php echo $this->escape($function); ?>" data-id="<?php echo $item->id; ?>" data-title="<?php echo $this->escape($item->title); ?>" data-uri="<?php echo 'index.php?Itemid=' . $item->id; ?>" data-language="<?php echo $this->escape($language); ?>">
									<?php echo $this->escape($item->title); ?>
								</a>
							<?php else : ?>

'separator', 'heading', 'alias', 'container' should for sure always be forbidden.

For URLs it depends if it is used or not in case of associations. Which does not mean when Associations are implemented generally speaking but only when the modal is used to set a menu item association when editing a menu item.

avatar infograf768
infograf768 - comment - 25 May 2018

Found a way to solve the issue for com_menus, but doing so I found out com_associations accepts associations with urls item type which is bad.
Now looking into that.

avatar artur-stepien
artur-stepien - comment - 25 May 2018

Why not just add a new attribute to modal field that will simply add query value to iframe and by that activating url type menu items or not? That way we gonna get control over where to accept them and where not.

avatar infograf768
infograf768 - comment - 26 May 2018

Hmm, II found something weird while looking at this.
We have in some xml fields of type modal_menu the element disable:
disable="separator,alias,heading,url"
But this element is not present in modal_menu type but only present for the MenuItemByType type.

This could be a remaining from before I created the first modal_menu and we were only using menuitembytype.

I have seen it for mod_login and for login/logout menu items.
I guess we should code a disable also for modal_menu if feasible.

avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Jun 2018
Status Information Required Discussion
avatar jwaisner jwaisner - change - 13 Mar 2020
Status Discussion Confirmed
avatar brianteeman
brianteeman - comment - 23 Aug 2022

please test #38563

avatar RickR2H RickR2H - change - 23 Aug 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-08-23 12:34:47
Closed_By RickR2H
Labels Added: No Code Attached Yet
Removed: ?
avatar RickR2H RickR2H - close - 23 Aug 2022
avatar RickR2H
RickR2H - comment - 23 Aug 2022

Closed because of PR #38563

Add a Comment

Login with GitHub to post a comment