No Code Attached Yet bug
avatar janschoenherr
janschoenherr
25 Aug 2021

Steps to reproduce the issue

Publish a menu module with layout default to the topbar position of the Cassiopeia template. Login to the Joomla frontend. Check the markup of the module in the frontend.

Expected result

Valid markup.

Actual result

<ul class="mod-menu mod-list nav foo-bar">
    <a class="btn btn-link jmodedit" href="#" target="_self" aria-describedby="tip-123">
    <span class="icon-edit" aria-hidden="true"></span><span class="visually-hidden">Edit</span></a>
    <div role="tooltip" id="tip-123">Edit Module<br>Test Menu<br>Position: below-top</div>
    <li class="nav-item item-101 default current active"></li>
</ul>

System information (as much as possible)

Joomla 4.0.*

Additional comments

The following line https://github.com/joomla/joomla-cms/blame/4.0-dev/layouts/joomla/edit/frontediting_modules.php#L40 will create invalid markup, if the module's outer tag is an <ul> or <ol>. (e.g.

The Unordered List element <ul may only contain <li>, <template>, <script> child elements.

Introduced with 678e929

avatar janschoenherr janschoenherr - open - 25 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 25 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Aug 2021
avatar brianteeman
brianteeman - comment - 24 Feb 2022

I can not replicate this - maybe it was changed since the issue was first created

image

avatar Quy Quy - change - 24 Feb 2022
Labels Added: Information Required
avatar Quy Quy - labeled - 24 Feb 2022
avatar janschoenherr janschoenherr - change - 24 Feb 2022
The description was changed
avatar janschoenherr janschoenherr - edited - 24 Feb 2022
avatar janschoenherr
janschoenherr - comment - 24 Feb 2022

@brianteeman I just updated the Steps to reproduce. Maybe it needs to be the topbar position, because the module does not get wrapped there.

avatar brianteeman
brianteeman - comment - 8 Mar 2022

Yes that was it. It is a bug but very low priority. Do you have an idea how to fix it

avatar janschoenherr
janschoenherr - comment - 15 Mar 2022

I can only think of wrapping the modules in an extra <div>.

Trying to insert the button into the first <li> can possibly fail if there is none.

avatar brianteeman
brianteeman - comment - 15 Mar 2022

Can't really see the point myself

avatar brianteeman
brianteeman - comment - 19 Apr 2022

Can someone remove the information required tag please

avatar drmenzelit drmenzelit - change - 19 Apr 2022
Labels Removed: Information Required
avatar drmenzelit drmenzelit - unlabeled - 19 Apr 2022
avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment