-
Notifications
You must be signed in to change notification settings - Fork 39
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
SmartyV3 compatibility (on CiviCRM 5.69.5 + PHP 8.1) #419
Comments
One more issue that I've found (based on this post) is that in theory, some functions have been renamed. on banking/CRM/Banking/Helpers/Smarty.php -> line 85 -> Similarly on banking/CRM/Banking/Page/Review.php -> line 316 -> old value: |
After further investigation, I did find the culprit for the
Now, regarding the bank accounts tab, debugging the error, it seems that there's an API call that throws this error because, I suppose, doesn't exist: https://github.com/Project60/org.project60.banking/blob/master/templates/CRM/Banking/Form/AccountsTab.tpl#L17 Removing line 17 completely does render the tab properly, which means we got 2 options here:
Thoughts? |
I've created a branch in my own fork and tried to sort things out.
I've tried it in both smarty V3 and smarty V2 and had no issues so far. The draft PR is located here |
On my comment above I've wrongly assumed that I needed to switch this function:
I shouldn't, since this is already being taken care by CiviCRM Core itself . |
Well, So we should either add a version switch or call |
You have a point there. I would go for this approach along with a conditional check on the civicrm version (?). I don't think that it's so heavy to pull the version and do a conditional check and use the proper function, no ? We could also play it safer and instead of checking the civicrm version, check if the 2 constants: Thoughts? |
What about, in the overridden |
Just tested this conditional check on both CiviCRM 5.69.x (which I am currently working on) and also on the latest tag 5.72.1: // Check if this method exists already
if (method_exists($this, 'getTemplateVars')) {
$vars = $this->getTemplateVars();
}
else {
$vars = $this->get_template_vars();
} For 5.69.x condition that fires up is the 2nd, while on 5.72.1, it's the first ( |
With version 1.1.0 CiviBanking seems to be compatible with Smarty 3. I guess we can close this issue, as it has been fixed with #420. |
Fine by me! |
Hi all.
I've tried both MRs reported here:
but even though I tried both, I do still have some issues. While visiting the
/civicrm/banking/payments
I get:SmartyException: "undefined extension class 'Smarty_Internal_Runtime_Get_Plugin_Filepath'"
plus the 'Bank accounts' tab does not render. I get to get a similar error on the backend:
[warning] Attributes passed to CRM_Core_Form::add() are not an array. Caller: CRM_Banking_Form_AccountsTab::buildQuickForm
and then at the same time:
"message" => "undefined extension class 'Smarty_Internal_Method_Trigger_Error'"
The frontend ui appears empty on that tab.
Site: CiviCRM 5.69.5 + PHP 8.1 + SmartyV3
The text was updated successfully, but these errors were encountered: