Skip to content

chore(core): remove dead Hallo.js editor hooks - #263

Merged
matrixise merged 1 commit into
masterfrom
chore/remove-hallo-hooks
Nov 21, 2026
Merged

matrixise merged 1 commit into
masterfrom
chore/remove-hallo-hooks

Conversation

@matrixise

Copy link
Copy Markdown
Contributor

Why

Hallo.js was removed from Wagtail in 2.0 and replaced by Draftail. pythonie/core/wagtail_hooks.py still targeted it, so all of its hooks were dead:

Hook Effect today
insert_editor_js (×2) Calls registerHalloPlugin(), which no longer exists, so it throws a JavaScript error in the page editor
construct_whitelister_element_rules (×2) Never invoked: Wagtail 7.3.4 and 8.1 contain no caller for this hook. The iframe / tito-widget / blockquote rules were ignored
insert_editor_css Loaded Font Awesome for the Hallo toolbar buttons only

Changes

  • Delete pythonie/core/wagtail_hooks.py
  • Delete pythonie/core/static/js/hallo-custombuttons.js (only loaded by these hooks)

css/font-awesome.min.css is kept.

Independent from #262 (Wagtail 8.1): the hooks are already dead on 7.3.4.

Behaviour change

None expected for content: the rich-text rules were not applied anyway. If editors really need iframes or tito widgets in rich text, that should be done with a Draftail feature or a dedicated StreamField block, in a separate PR.

Tests

  • manage.py check: no issues
  • Test suite: 7 tests OK

Manual test plan

  • Open the page editor: no registerHalloPlugin error in the browser console
  • Edit and publish a page with rich text

🤖 Generated with Claude Code

Hallo.js was removed from Wagtail in 2.0 (replaced by Draftail), so
every hook in core/wagtail_hooks.py has been a no-op or worse:

- insert_editor_js calls registerHalloPlugin(), which no longer exists
  and raises a JavaScript error in the page editor.
- construct_whitelister_element_rules is never invoked by Wagtail any
  more, so the iframe, tito-widget and blockquote rules were ignored.
- insert_editor_css loaded Font Awesome only for the Hallo buttons.

Also drop js/hallo-custombuttons.js, which was only loaded by these
hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matrixise
matrixise merged commit 88ad0af into master Nov 21, 2026
4 checks passed
@matrixise
matrixise deleted the chore/remove-hallo-hooks branch November 21, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant