Skip to content

docs: Describe generic entity events for Contact and Custom Field saves and deletes (8.0) - #995

Open
promptless-for-oss wants to merge 1 commit into
mautic:8.0from
Promptless:promptless/pr-18416-lead-field-entity-events-8.0
Open

promptless-for-oss wants to merge 1 commit into
mautic:8.0from
Promptless:promptless/pr-18416-lead-field-entity-events-8.0

Conversation

@promptless-for-oss

@promptless-for-oss promptless-for-oss commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Open in Promptless

Documents mautic/mautic#18416, which moves Contact (Lead) and Custom Field (LeadField) save and delete events to the generic EntityPreSave, EntityPostSave, EntityPreDelete, and EntityPostDelete events.

Changes

docs/plugins/event_listeners.rst now:

  • Uses EntityPostSave and EntityPostDelete with an instanceof Lead guard in the opening subscriber example and the #[AsEventListener] example.
  • Lists Lead and LeadField among the entities that fire the generic entity events, and no longer names LeadModel as a model with its own events.
  • Tells Plugin developers to subscribe to the generic events for Contact and Custom Field saves and deletes, notes the new-visitor dispatch from ContactTracker, and that Form Fields fire the same events.
  • Explains that LeadPreBatchSaveEvent / LeadPostBatchSaveEvent wrap the per-Contact generic events returned by getLeadsEvents().
  • Drops the removed LeadPreSaveEvent, LeadPostSaveEvent, LeadPreDeleteEvent, LeadPostDeleteEvent, Field*Event, and LeadFieldEvent classes from the LeadBundle tables and lists, and removes the outdated FieldSaveDispatcher::dispatchEvent() note. UPGRADE-8.0.md covers the migration details.

Reviewer note

mautic/mautic#18416 has merged into 8.x, and this PR matches the merged code. It also covers the Contact part of mautic/mautic#18409, which is still open. If #18409 closes without merging, close its docs PR #993 too. If #18409 lands later, rebase #993 on this PR first.

Validation 2 passed
  • ✓ Vale (collection and canonical rules): 0 new findings in docs/plugins/event_listeners.rst
  • ✓ Sphinx HTML build: no warnings for plugins/event_listeners

Trigger Events

Comment thread docs/plugins/event_listeners.rst Resolved
@promptless-for-oss

promptless-for-oss commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

The build check on commit 08dc860 failed in its Check links step, and this suggestion didn't cause it. The link checker reported two broken links on docs/index.rst line 48, which this PR doesn't change:

Both return 500 Internal Server Error because the Mautic Community Portal is down. PRs #991, #992, and #993 failed on the same two links. Every link on docs/plugins/event_listeners.rst, the only file this PR changes, passed.

No docs change is needed. Both links still returned 500 at about 20:00 UTC, so the check wasn't re-run. Re-run it once community.mautic.org is back up, and it should pass.

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