Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【システム】カスタムコンテンツのルーティングで500エラーが返ることがある #4141

Open
build1024 opened this issue Mar 6, 2025 · 1 comment
Labels
Bug バグ

Comments

@build1024
Copy link

build1024 commented Mar 6, 2025

概要

/items/ というURLにカスタムコンテンツを割り当てている場合、/items/view/ 以下のURLがどのエントリーにもマッチしない場合、"An Internal Error Has Occurred." のページが表示され、HTTPステータスコード500が返ります。これはサーバー側の問題を示す値であり、本来は Not Found (404エラー) のページが表示されるのが望ましいと考えます。

再現手順

  • 管理画面「コンテンツ」のツリーに、任意のテーブルに紐づいたカスタムコンテンツを追加する。例えば、スラッグを items に設定する。
  • https://example.com/items/ にアクセスすると、空のリストのページが表示される(これは期待通り)。
  • https://example.com/items/view/https://example.com/items/view/aaaaa にアクセスすると、Internal Server Error のページが出る (500エラー)。

デバッグモードを有効化したところ、エラー内容は以下でした。

ビュー変数 $customEntry がセットされていません。

なお、https://example.com/items/aaaa のようなURLでは Not Found (404エラー) となります。/items/view/ 以下の場合のみ発生するようです。

baserCMS version : 5.1.5

@ryuring
Copy link
Collaborator

ryuring commented Mar 6, 2025

@build1024 報告ありがとうございます。確かに404が望ましいですね

@ryuring ryuring added the Bug バグ label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug バグ
Projects
None yet
Development

No branches or pull requests

2 participants