Missing Template File TermsAndConditions.tpl Causes Fatal Error
Created by: tresero
Description:
When attempting to access or modify event settings within CiviCRM, a fatal error is triggered due to the system being unable to load a required template file for the GDPR extension. The specific file CRM/Gdpr/Form/ManageEvent/TermsAndConditions.tpl appears to be missing from the extension's directory, resulting in a SmartyException and preventing successful page loads.
Steps to Reproduce:
Navigate to the WordPress admin dashboard. Go to CiviCRM > Events > Manage Events. Select an event and attempt to access its settings. The error occurs at this point, with CiviCRM unable to proceed due to the missing template file. Expected Behavior: The expected behavior is for the event settings page to load without issues, allowing for the management of GDPR-related settings for events.
Actual Behavior:
A fatal error occurs, with the following details captured in the logs:
Fatal Error Details = array:3 [
"message" => "Unable to load template 'file:CRM/Gdpr/Form/ManageEvent/TermsAndConditions.tpl' in 'file:CRM/Form/default.tpl'"
"code" => null
"exception" => SmartyException {#17487
...
]
Environment:
CiviCRM Version: 5.70.0 GDPR Extension Version: 3.5 CMS: WordPress PHP Version: [Specify version]
Troubleshooting Steps Already Taken:
Verified the GDPR extension is correctly installed and up to date. Checked the file system for the presence of TermsAndConditions.tpl in the expected directory (CRM/Gdpr/Form/ManageEvent/) and confirmed it is missing. Cleared CiviCRM caches. Checked file and directory permissions to rule out access issues.
Suggested Fix:
It appears this issue may be due to the file either being accidentally omitted from the extension package or a reference to a deprecated or renamed file that hasn't been updated. A review and correction of the extension's file structure and references to TermsAndConditions.tpl would likely resolve this issue.