Custom Field Tokens have stopped working.
Steps to reproduce
- Add custom fields to your contact
- Create a template that uses the custom fields (e.g. {contact.custom_2} )
- Attempt to use Pdf.create with this template and contact.
Expected results
Pdf is created with the token values filled.
Actual results
No errors, but tokens are replaced with blanks.
Notes
This seems to be a regression introduced with commit f4ef1930 "update fixed issue with case tokens and mediwe tokens".
I can fix the behaviour by changing it to pull the required contact fields directly with CRM_Utils_Token::getTokenDetails
(see pdfapicustomfields.patch) – which is similar to what it was doing before the commit mentioned, but I'm unsure whether this will reintroduced the problem it was trying to fix.
Edited by Francis (Agileware)