Twig error on Redemptions with no related Order
Closed this issue · 2 comments
pixelmachine commented
Describe the bug
Redemptions do not require an Order (order relations can be null). However the redemptions table in templates/codes/_fields
expects an order, so a Twig error is thrown if one is not provided.
Steps to reproduce
- Create a Redemption using a plugin or module and do not pass it an Order.
- View the code in the CP and get an error (in dev mode)
Craft CMS version
3.7.51
Plugin version
2.7.1
Multi-site?
No
Additional context
The template is the same for all versions of Gift Voucher
pixelmachine commented
Worth also pointing out that without an order there's also no date since the redemption date is just the order date not the date the redemption was created.
engram-design commented
Fixed in 2.7.2