Skip to content

refactor!: drop the MEDIA_MOVED and GENERATE_FILTER extension points - #6784

Merged
gharlan merged 1 commit into
6.xfrom
handler
Oct 21, 2026
Merged

gharlan merged 1 commit into
6.xfrom
handler

Conversation

@gharlan

@gharlan gharlan commented Oct 21, 2026

Copy link
Copy Markdown
Member

First step of the remaining structure/media pool extension point cleanup.

MEDIA_MOVED → MediaUpdated

MEDIA_MOVED was dispatched by the pages, not by the handler:

  • the detail form saved the category via MediaHandler::edit() (dispatching MediaUpdated) and dispatched MEDIA_MOVED afterwards by hand,
  • the bulk move of the media list updated rex_media directly, bypassing the handler and thus MediaUpdated.

Unlike articles (separate operation and permission, hence ArticleMoved), moving media is part of editing them. So the bulk move now calls MediaHandler::edit() with just the category_id as well, and MEDIA_MOVED is removed: a move is a MediaUpdated whose previous state has a different categoryId. A separate MediaMoved would have to be dispatched in addition to MediaUpdated for the detail form, i.e. two events for one change.

The rector rule maps MEDIA_MOVED to MediaUpdated, like ART_META_UPDATED → ArticleUpdated in #6778. Usage in public addons: none found except redaxo.org.

GENERATE_FILTER removed

It let extensions modify the generated PHP code of the content cache. The rendered output can be modified via ART_CONTENT, SliceOutput or OUTPUT_FILTER. Usage in public addons: none found except redaxo.org.

Tested

Bulk move into a media category and moving back via the detail form, both in the backend.

Moving media is part of editing them: the detail form saves the category via `MediaHandler::edit()`, and the bulk
move of the media list now does so as well instead of updating the table directly. Both dispatch `MediaUpdated`, whose
`previous` state shows a changed category, so the separately dispatched `MEDIA_MOVED` is removed. A rector rule maps
it to `MediaUpdated`.

`GENERATE_FILTER` let extensions modify the generated PHP code of the content cache; the rendered output can be
modified via `ART_CONTENT`, `SliceOutput` or `OUTPUT_FILTER` instead.
@gharlan gharlan added this to the REDAXO 6.0 milestone Oct 21, 2026
@gharlan
gharlan merged commit 8836f20 into 6.x Oct 21, 2026
15 checks passed
@gharlan
gharlan deleted the handler branch October 21, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants