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

Inconsistent behaviour when no entityId is passed to detail page #6293

Open
harmbandstra opened this issue May 3, 2024 · 0 comments
Open

Comments

@harmbandstra
Copy link

Describe the bug

I sometimes see errors in Sentry caused by users messing with the URL (probably unintentional). This led me to the following

When I visit this URL:
/admin?crudAction=detail&crudControllerFqcn=SomeCrudController&entityId=123
It will show the detail page

When I visit this URL:
/admin?crudAction=detail&crudControllerFqcn=SomeCrudController&entityId=
It will show a 404 not found page

When I visit this URL:
/admin?crudAction=detail&crudControllerFqcn=SomeCrudController
It will show a 500 internal server error

I am not sure if this is a bug or by design, but I feel the last one should also return a 404 and not a 500.

If this is indeed a bug, I can create a fix if you point me in the right direction as it can be handled in various parts of the application (AbstractCrudController, AdminContextFactory)

To Reproduce

Got to a detail page and remove the entityId query parameter.

(OPTIONAL) Additional context

When the entityId is not in the URL, the request is processed and fails when it enters the FormLayoutFactory. In my case, with this message "When using form columns, all fields must be rendered inside a column. However, your field "name" does not belong to any column. Move it under a form column or create a new form column before it.".

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

No branches or pull requests

1 participant