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

Admin Url Fix for linking from Edit/Detail to Index pages. #6252

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

nopenopenope
Copy link
Contributor

Scenario:

  • have two entity CRUD forms
  • have some entities in Entity 1
  • have a few, or none in Entity 2
  • have a association or relation to Entity 2 from Entity 1, but allow it to be null and let it be null (no links existing)
  • have a link to the Crud Index for Entity 2 in the Form of Entity 1 (when updating / FK existing)
  • click the link

Expected result:

  • you get redirected to the Index Page of the desired CRUD

Result:

  • Exception, as the FK of Entity 1 does not exist in Entity 2
  • and if it would, it would be the wrong one, but thats not a bug / exception

The main point is that the current setup assumes that there will always be existing links. Since non-referring pages like the Index do not need the entityId parameter, we can unset it when the scenario is matched (URL goes to Index, EntityId is set).

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.

None yet

1 participant