Can't view/edit grants
Overview
Can't view/edit grants.
This is a 5.67 regression, from https://github.com/civicrm/civicrm-core/pull/27411.
Reproduction steps
- Enable CiviGrant.
- Create a grant.
- Go to Grants » Find Grant. Search for your grant.
- Click View.
This is also true if you click View from a contact's Grants tab.
Additionally, while Edit works, the Edit and Delete buttons you see when viewing a grant do not.
Current behaviour
Empty grant view template.
Expected behaviour
Data should display.
Comments
There are two issues here. I have a partial fix but I can't work on this further.
- The View template contains tokens that aren't being passed to it. It's getting loaded from an
include
intemplates/CRM/Grant/Form/Grant.tpl
now, which it previously wasn't. We can use most of the values passed in{$form}
for an Edit page, but we don't have a good way to display selects in View mode. - When viewing the page, the grant ID and contact ID aren't being calculated correctly for the "Edit" and "Delete" button URLs.
To be honest, I'm not sure how this passed review. I can't find a single way to get a grant to display.