Skip to content

[6.x] Namespace plugin-defined action routes by plugin handle#18994

Merged
riasvdv merged 2 commits into
6.xfrom
rias/cms-2144-namespace-plugin-defined-actionsphp-routes-by-plugin-handle
May 29, 2026
Merged

[6.x] Namespace plugin-defined action routes by plugin handle#18994
riasvdv merged 2 commits into
6.xfrom
rias/cms-2144-namespace-plugin-defined-actionsphp-routes-by-plugin-handle

Conversation

@riasvdv
Copy link
Copy Markdown
Contributor

@riasvdv riasvdv commented May 28, 2026

Description

Namespace legacy plugin-defined actions.php routes by plugin handle so plugins can define route tails without colliding under the shared action trigger.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 28, 2026

CMS-2144

@riasvdv riasvdv marked this pull request as ready for review May 28, 2026 18:11
Copy link
Copy Markdown
Contributor

@AugustMiller AugustMiller left a comment

Choose a reason for hiding this comment

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

A bit of context, for observers…

This is considered a legacy feature, intended to mimic Yii’s "action" pattern of module-id/controller-name/action-id. Automatically-registered action paths in Craft 3.0 through 5.x were globally unique, based on the “controller namespace” they existed in, and plugins/modules were not able to register out-of-band action routes.

Nothing prevented (or will prevent) a developer or application from manually defining a conflicting route like admin/actions/... or actions/..., but this PR at least makes the "no-conflict" mode a default.

This is functionally equivalent to having used a top-level Route::prefix('my-plugin', ...) in your routes/actions.php file.

@riasvdv riasvdv merged commit c3ee06e into 6.x May 29, 2026
20 checks passed
@riasvdv riasvdv deleted the rias/cms-2144-namespace-plugin-defined-actionsphp-routes-by-plugin-handle branch May 29, 2026 07:34
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.

2 participants