[4.2] Remove ID attribute from mod_custom#37976
[4.2] Remove ID attribute from mod_custom#37976Fedik wants to merge 10 commits intojoomla:4.2-devfrom
Conversation
|
The changes to administrator/components/com_installer/src/Controller/InstallController.php look unrelated to me |
Conflicts: templates/cassiopeia/html/mod_custom/banner.php
|
That because it was for 4.1 first. |
|
Why the ID needs to be removed? |
|
This pull requests has been automatically converted to the PSR-12 coding standard. |
|
@simbus82 This is why: #37873 (comment) - multiple IDs are possible. @Fedik |
The code changes use of ID to class-[id] |
Ok, it's clear that we can't have multiple ID in a single DOM (but only for validation): in 2022 is only a problem if we try to pointing them wrongly with CSS and JS. |
|
As pointed out before by others removing the id will be an isssue for any site that is using the id for css and/or js (I am) and while it can be argued that this is not covered by the b/c promise is it really necessary? The only way that you can have one module (with the same id) published more than once is to additionally load the module in some content with the loadmodule plugin. As that is a deliberate action by the web developer to publish the module twice on the same page when it makes no sense to do so I would expect the occurance of this to be infinitely less than the use of the id or js/css |
|
I just sugested a solution to avoid duplicated ids (even if it rare possible) :) |
|
Mod_custom is the module used as reference for new module that should not suggest to use wrong syntax. |
|
For keep b/c I can revert ID (for people who use js), but the styling (background image) will be done with class. And will remove ID in j5 (if no one forget). |
|
Hey everyone, I am new here. Please tell me how to start here and what are the skills required to contribute here. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37976. |
|
@Mrsuperstar304 thank you for your interest in contributing to Joomla. Maybe you start with this video https://www.youtube.com/watch?v=30JYBOeNVTA. Or search for "how to contribute " in joomla documentation. |
And it's a wrong syntax to not have an unique ID for every instance of rendered mod_custom in the DOM 😄 |
|
I have restored ID, and added a comment that it should be removed in next Major version |
Summary of Changes
It redo of #32980, but without use of ID attribute
Testing Instructions
Select background Image for mod_custom,
And check module on the site, also the module HTML markup
Actual result BEFORE applying this Pull Request
Background visible, module have an ID attribute
Expected result AFTER applying this Pull Request
Background visible, module do not have an ID attribute
Documentation Changes Required
none