Convert some Wagtail hooks into signals#455
Merged
RealOrangeOne merged 13 commits intomainfrom Jan 19, 2026
Merged
Conversation
This lets the signals be sent when running non-wagtail admin codepaths.
zerolab
reviewed
Jan 7, 2026
zerolab
approved these changes
Jan 7, 2026
MebinAbraham
approved these changes
Jan 7, 2026
sanjeevz3009
approved these changes
Jan 7, 2026
…may have already created an instance. This happens because instances are created automatically when the TopicPage is created
MaciekBaron
requested changes
Jan 7, 2026
Contributor
MaciekBaron
left a comment
There was a problem hiding this comment.
Three tests have regressed - the first two can be solved by running the hooks on the newly created pages (so that the appropriate translated pages get created), see my comment.
The third test might be due to additional log entries being created in your solution.
MaciekBaron
approved these changes
Jan 19, 2026
MebinAbraham
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the context of this PR?
As mentioned in the Wagtail docs (see note at top of page), signals are only intended for modifying functionality in the Wagtail Admin (eg registering URLs), rather than firing on events. For events, signals are much preferred, as hooks only fire in the admin, rather than everywhere.
There should be no functionality change, since these triggers will still fire during the admin. This just means that during other paths, they'll fire, leading to the correct behaviour in other codepaths (eg #445 ).
How to review
Confirm that no hooks were dropped, only moved to the appropriate signal.
Follow-up Actions