-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
php8.x fatal fix + bonus smarty consistency #27091
Conversation
Thank you for contributing to CiviCRM! ❤️ We will need to test and review the PR. 👷 Introduction for new contributors
Quick links for reviewers |
I'm checking for the corresponding conditionals in the message templates and it is confusing. For customPre and customPost, this looks fine. For additionalCustomPre and additionalCustomPost, this is less clear. Not sure I totally understand what's going on here, but here's what I have: In the event_offline_receipt_html template, I don't see a conditional, but then it isn't clear to me if this part of the template is reachable. I think $customProfile is only assigned for an online event registration - we can't have additional participants for offline event registrations, can we? So maybe we can cut this out entirely. For online registrations, it looks like we use This is kind of a separate issue and I can do a separate PR if that makes sense. |
Actually, zooming out here: Is there any case when an offline event receipt contains profile fields at all? |
I'm working on a slightly more in-depth refactor for this (an alternative to your alternative, if you will). This will remove the pass by reference $template entirely, so will get rid of the source of the error (though CiviMobile uses the function, so I might need to leave $template in as a transitional measure). |
Jenkins test this please |
So if it doesn't make sense to do a deeper refactor, then I think this is ready to merge. I've given it an r-run (along with the original PR, agree that both should be merged). @eileenmcnaughton can you think of any case where an offline receipt could possibly contain profile fields? If not, I'm going to remove those from the templates. |
OK - I'll merge this based on your testing Re whether the offline receipt could have template fields - for ? historical reasons the offline receipt has a custom fields block & the online receipts display the profiles that are available for the event - seems a bit odd to me but I have mostly focussed on cleaning up the code, rather than the UI |
Thanks @eileenmcnaughton |
Overview
Alternative to https://github.com/civicrm/civicrm-core/pull/27073/files
Before
the
countable
check that causes the problems is used to decide whether to assign the value to the templateAfter
The value is always assigned, as null if need be
Technical Details
Ensuring smarty vars are assigned regardless of the flow is one of our practices we are working towards
Comments