Skip to content

Send expert review redirects to the expedition instead of a Not Found page - #563

Merged
rbruhn merged 1 commit into
developmentfrom
fix-reconcile-redirects
Oct 12, 2026
Merged

rbruhn merged 1 commit into
developmentfrom
fix-reconcile-redirects

Conversation

@rbruhn

@rbruhn rbruhn commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

When the expert review page can't be shown, ExpertReconcileController redirects back to the expedition, but three of its redirects passed [$expedition->project_id, $expedition->id] to admin.expeditions.show. That route only takes the expedition (expeditions/{expedition}), so the redirect went to /admin/expeditions/{project_id}?{expedition_id}, a "Not Found" page, and the message was lost.

Affected:

  • index, no reconcile data: "Reconcile data for processing is missing."
  • index and create, the user isn't in the project's group: "You do not have sufficient permissions."

All three now pass [$expedition], like the other redirects in the controller.

Found on development: /admin/reconciles/408a0fd9-… (expedition 491, marked for expert review but with no reconcile records there) redirected to /admin/expeditions/142?491.

Tests

tests/Feature/Admin/ExpertReconcileRedirectTest.php (new): a group member with no reconcile data, and a user outside the group on index and create, are sent to the expedition with the right flash message (read from the app_flash cookie, where FlashHelperMessage puts it on GET requests). All three failed before the fix with the /admin/expeditions/1?1 redirect.

To verify on development

Open /admin/reconciles/408a0fd9-0fd4-4fde-8f82-f69f0d0ae33e: it should land on that expedition with "Reconcile data for processing is missing." An expedition with reconcile data, such as "WeDigFLPlants' Mints of Florida—More than Mojitos" (tools → Expert Review Ambiguities), still opens the expert review.

… page

Three redirects in ExpertReconcileController passed the project ID and the expedition ID to admin.expeditions.show, which only takes the expedition, so they landed on /admin/expeditions/{project_id}?{expedition_id}. They now pass the expedition.
@rbruhn
rbruhn merged commit 9f0b4a3 into development Oct 12, 2026
2 checks passed
@rbruhn
rbruhn deleted the fix-reconcile-redirects branch October 12, 2026 19:31
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.

1 participant