? ? Pending

User tests: Successful: Unsuccessful:

avatar hans2103
hans2103
24 Nov 2020

Pull Request for Issue #31466 .

Summary of Changes

This PR will fix the obsolete underlined space in the menu item link when selecting one on creation of a menu item alias.
The same solution is applied as used on the com_menus/items

<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_menus&task=item.edit&id=' . (int) $item->id); ?>" title="<?php echo JText::_('JACTION_EDIT'); ?>">
<?php echo $this->escape($item->title); ?></a>

Testing Instructions

  • Joomla 4.0-dev with at least one configured menu item.
  • Create a new menu item of type System Links > Menu Item Alias
  • Press button Select on field = Menu Item
  • A modal popup appears where you can select a menu item
  • See the result and compare it with BEFORE
  • apply this pr and repeat the steps above
  • See the result and compare it with ATER

Actual result BEFORE applying this Pull Request

Schermafbeelding 2020-11-24 om 13 37 53

Expected result AFTER applying this Pull Request

Schermafbeelding 2020-11-24 om 13 55 44

Documentation Changes Required

avatar hans2103 hans2103 - open - 24 Nov 2020
avatar hans2103 hans2103 - change - 24 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2020
Category Administration com_menus
avatar hans2103 hans2103 - change - 24 Nov 2020
Title
fix obsolete underlined whitespace in link
[4.0] fix obsolete underlined whitespace in link
avatar hans2103 hans2103 - edited - 24 Nov 2020
avatar ceford ceford - test_item - 25 Nov 2020 - Tested successfully
avatar ceford
ceford - comment - 25 Nov 2020

I have tested this item successfully on b30be68


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

avatar infograf768
infograf768 - comment - 25 Nov 2020

I suggest to rather use the same code format as in default.php by moving the closing </a> to the line above, i.e.

diff --git a/administrator/components/com_menus/tmpl/items/modal.php b/administrator/components/com_menus/tmpl/items/modal.php
index 02689b4..50ec12f 100644
--- a/administrator/components/com_menus/tmpl/items/modal.php
+++ b/administrator/components/com_menus/tmpl/items/modal.php
@@ -115,6 +115,5 @@
 							<?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 echo $this->escape($item->title); ?></a>
 							<?php else : ?>
 								<?php echo $this->escape($item->title); ?>

to get

<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>
avatar drmenzelit drmenzelit - test_item - 25 Nov 2020 - Tested successfully
avatar drmenzelit
drmenzelit - comment - 25 Nov 2020

I have tested this item successfully on b30be68


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

avatar hans2103
hans2103 - comment - 25 Nov 2020

@infograf768 that is what I did... moving the closing </a> directly after <?php echo $this->escape($item->title); ?>.
Can you point me the difference?

avatar infograf768
infograf768 - comment - 25 Nov 2020

OOPPS, sorry, confusion here due to old age and home lockdown...
Patch is fine.

avatar infograf768 infograf768 - change - 25 Nov 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 25 Nov 2020

rtc


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

avatar infograf768
infograf768 - comment - 25 Nov 2020

restarted drone

avatar wilsonge wilsonge - change - 26 Nov 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-11-26 14:38:29
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge wilsonge - close - 26 Nov 2020
avatar wilsonge wilsonge - merge - 26 Nov 2020
avatar wilsonge
wilsonge - comment - 26 Nov 2020

Thanks!

avatar Sulpher
Sulpher - comment - 13 Sep 2021

This problem is actual in the latest version of Joomla 4.
Just go to create a new menu item > articles and get a popup window with list of articles and there is such a space in the link.

Снимок экрана 2021-09-13 в 13 12 41

Снимок экрана 2021-09-13 в 13 12 35

Снимок экрана 2021-09-13 в 13 15 04

avatar brianteeman
brianteeman - comment - 13 Sep 2021

You have identified a valid issue but it is nothing to do with the issue here. please create a new report

Add a Comment

Login with GitHub to post a comment