Skip to content

Duplicated active file highlight in com_templates with similar names #25395

@n9iels

Description

@n9iels

What needs to be fixed

In option=com_templates&view=template the file tree on the left highlights both files as "active" when the names are similar, like menu.less and mmenu.less.

How would you fix it

The root-cause of this issue is the way the active item is set. Currently this happens with a piece of JavaScript and a regex: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_templates/views/template/tmpl/default.php#L91

Either the regex is insufficient or the method of comparison is not the right one.

Side Effects expected

I am not sure why a regex is used here instead of a === or something like that. Maybe there are some unwanted side effects I am not aware of?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions