Skip to content

[7.0] Moves deprecated HTML helpers to compat#47974

Open
laoneo wants to merge 4 commits into
joomla:7.0-devfrom
Digital-Peak:remove/htmlhelper
Open

[7.0] Moves deprecated HTML helpers to compat#47974
laoneo wants to merge 4 commits into
joomla:7.0-devfrom
Digital-Peak:remove/htmlhelper

Conversation

@laoneo

@laoneo laoneo commented Jun 17, 2026

Copy link
Copy Markdown
Member
  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Moves deprecated HTML helper functions to the compat plugin. When the whole helper is not deprecated, then the respective functions will throw an exception when the plugin is disabled.

Testing Instructions

  • Add the code \Joomla\CMS\HTML\HTMLHelper::_('behavior.core'); to the file /components/com_content/tmpl/featured/default.php
  • Open the front end with the compat7 plugin enabled and disabled

Actual result BEFORE applying this Pull Request

It always loads.

Expected result AFTER applying this Pull Request

It loads with the compat plugin enabled and throws the following error when disabled:
behavior::core not found

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@laoneo laoneo added the b/c break This item changes the behavior in an incompatible why. HEADS UP label Jun 17, 2026
@laoneo laoneo added the Architecture Pull requests which improve the architecture. label Jun 18, 2026
@laoneo laoneo changed the title [7.0] Moves deprecated helpers to compat [7.0] Moves deprecated HTML helpers to compat Jun 19, 2026
HTMLHelper::_('bootstrap.framework');
Factory::getApplication()->getDocument()->getWebAssetManager()->useScript('dropdown');

Factory::getDocument()->addScriptDeclaration("

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laoneo you do realize that this is completely broken, ie the inline script is using jQuery without actually including it...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the fix?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a fix, just pointing out that this file was probably unusable for quite some time ie since 4.0 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Pull requests which improve the architecture. b/c break This item changes the behavior in an incompatible why. HEADS UP PR-7.0-dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants