? ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
5 Apr 2020

This namespaces the JHtml helpers as agreed by Production. Fixes #28249

  • Also fixes a bug in the error_login.php file of atum that I discovered whilst doing this where we could double register a html service

Summary of Changes

Namespaces JHtml classes. Note the two classes that are new for J4 (workflowstages and draggable do not have namespace mappings created as they are new for j4)

Testing Instructions

Ensure CMS works as before in a variety of frontend and backend views

If you are technical review class names make sense - as they aren’t tied to the name being called they can be made longer without any affect

Documentation Changes Required

Yes. If you are overriding JHtml methods you can no longer use \Joomla\CMS\HTML\HTMLHelper::register() you now must instead use

\Joomla\CMS\HTML\HTMLHelper::getServiceRegistry()->register('jquery', 'MyCustomClass', true);

The last parameter $replace is the important part :) Note that this means you can only override the entire Helper. You can't overload a specific function after this change. In the two cases where people regularly do this in the ecosystem (bootstrap and jquery) this isn't really an issue:

  • In JQuery there are only two methods - the second a helper for ajax and it's a minor thing to have to duplicate and I don't see any real issues forthcoming as jQuery is now fairly static
  • In Bootstrap whilst there are lots of methods they output html specific to the bootstrap version so you'd need to have overridden them anyhow
avatar wilsonge wilsonge - open - 5 Apr 2020
avatar wilsonge wilsonge - change - 5 Apr 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2020
Category Repository Administration Templates (admin) Libraries
avatar wilsonge wilsonge - change - 5 Apr 2020
The description was changed
avatar wilsonge wilsonge - edited - 5 Apr 2020
avatar wilsonge wilsonge - change - 5 Apr 2020
The description was changed
avatar wilsonge wilsonge - edited - 5 Apr 2020
avatar richard67
richard67 - comment - 5 Apr 2020

@wilsonge PHPCS

avatar wilsonge wilsonge - change - 5 Apr 2020
Labels Added: ?
avatar wilsonge
wilsonge - comment - 6 Apr 2020

Tagged as beta blocker

avatar richard67
richard67 - comment - 6 Apr 2020

@wilsonge Label has been removed after you added it.

avatar wilsonge wilsonge - change - 6 Apr 2020
The description was changed
avatar wilsonge wilsonge - edited - 6 Apr 2020
avatar jwaisner jwaisner - change - 8 Apr 2020
Priority Medium Urgent
avatar wilsonge wilsonge - change - 10 Apr 2020
The description was changed
avatar wilsonge wilsonge - edited - 10 Apr 2020
avatar jwaisner
jwaisner - comment - 10 Apr 2020

I have tested this item successfully on ed8e2b1

Tested frontend and backend. No issues found. Did not have overrides in place.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28581.
avatar jwaisner jwaisner - test_item - 10 Apr 2020 - Tested successfully
avatar richard67
richard67 - comment - 10 Apr 2020

I have tested this item successfully on ed8e2b1

Also tested frontend and backend without having any overrides in place.
I hope I haven't forgotten anything.


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

avatar richard67 richard67 - test_item - 10 Apr 2020 - Tested successfully
avatar richard67 richard67 - change - 10 Apr 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 10 Apr 2020

RTC


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

avatar wilsonge wilsonge - change - 11 Apr 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-04-11 09:12:59
Closed_By wilsonge
Labels Added: ? ? ?
avatar wilsonge wilsonge - close - 11 Apr 2020
avatar wilsonge wilsonge - merge - 11 Apr 2020
avatar wilsonge
wilsonge - comment - 11 Apr 2020

Ok merging as a first pass. Agree with ListHelper but willing to take followups if anyone comes up with something better

Add a Comment

Login with GitHub to post a comment