Skip to content

fix #3621 【プラグイン】BcBaserHelper->getContentsNameでプラグインのコントローラー名が取得できずdefaultになる件を修正#4411

Open
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#3621
Open

Conversation

@kaburk

@kaburk kaburk commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします!

Copilot AI review requested due to automatic review settings June 4, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

本PRは、BcBaserHelper::getContentsName() がフロント側のプラグインルーティング時にプラグインコントローラー名を正しく判定できず Default 扱いになってしまう問題(#3621)を修正し、その挙動をユニットテストで担保する変更です。

Changes:

  • フロント側で plugin パラメータが存在する場合は「固定ページ扱い」を避け、プラグインルーティングとして判定するように修正
  • プラグイン(フロント)相当のケースを getContentsName() のテストデータに追加し、Request の params をテスト側から注入できるように調整
  • in_array() を strict 比較に変更し、意図しない型変換を避けるよう改善

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
plugins/baser-core/src/View/Helper/BcBaserHelper.php フロントのプラグインルーティング時に固定ページ判定へ入らないよう条件を調整し、期待するコンテンツ名を返せるよう修正
plugins/baser-core/tests/TestCase/View/Helper/BcBaserHelperTest.php リクエストのルーティング params を注入する仕組みを追加し、プラグイン(フロント)ケースの期待値を追加

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