Answers.Body: <p><code>civix upgrade</code> would always be the first step if you get those template errors. You can almost always answer yes to all the questions.</p>
  <p>There might be a few more things beyond that, like if they use php functions in the smarty tpl files, or sometimes it doesn't like the quoting in evaluated variables. But the civix upgrade should get you most of the way there.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-27T19:28:38.963Z
Answers.LastActivityDate: 2024-10-27T19:28:38.963Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Thanks again, Demerit. I was successfully able to uninstall / civix upgrade taking default answers / re-install the two extensions that I needed and so far things seem to be running fine in Smarty v5.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-27T21:07:16.780Z
Answers.LastActivityDate: 2024-10-27T21:07:16.780Z
Answers.UserDisplayName: Michael Matthews
Body: <p>WordPress install (latest version, currently 6.6.2), CiviCRM currently 5.78.3. In order to enable Smarty v5, I had to disable some third party extensions (Geodata Filler, <a href="https://github.com/ginkgostreet/com.ginkgostreet.geofill;" rel="nofollow noreferrer">https://github.com/ginkgostreet/com.ginkgostreet.geofill;</a> County Geocoding Lookup, <a href="https://github.com/MegaphoneJon/countylookup;" rel="nofollow noreferrer">https://github.com/MegaphoneJon/countylookup;</a> Member Only Event, <a href="https://civicrm.org/extensions/member-only-event" rel="nofollow noreferrer">https://civicrm.org/extensions/member-only-event</a>) because they threw what I think is an expected error (&quot;PHP Fatal error: Uncaught Error: Cannot access protected property Smarty\Smarty::$template_dir in /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty5/Smarty.php:37&quot;) for extensions that were created with an older version of civix.</p>
  <p>These extensions provided some useful value (automatically populating the county of each contact or event address makes it easier to get counts as to where members and events are/have been at the county level; we sometimes have events that are only open to higher tiers first, and then lower tiers as space permits, and using the waitlist functionality works but is significant extra manual effort), but I'd rather get up to Smarty v5 before it becomes a requirement.</p>
  <p>My main question is... has anyone just re-run civix on these extensions, and did that work? Functionally it does do some sort of update, but there are a lot of questions asked during this process which I'm not sure how to answer. I did put in an issue report on all but the Geodata filler one (as that's been archived?).</p>
  <p>Thanks for any info for suggestions you can provide.</p>
  <p>Michael</p>
  
Tags: <upgrade><smarty><civix>
Title: Updating older extensions to be compatible with Smarty 5 - as simple as just running civix against them?
ThreadText: # Updating older extensions to be compatible with Smarty 5 - as simple as just running civix against them?
  
  (Asked by: username_0 on 2024-10-27)
  
  WordPress install (latest version, currently 6.6.2), CiviCRM currently 5.78.3. In order to enable Smarty v5, I had to disable some third party extensions (Geodata Filler, <https://github.com/ginkgostreet/com.ginkgostreet.geofill;> County Geocoding Lookup, <https://github.com/MegaphoneJon/countylookup;> Member Only Event, <https://civicrm.org/extensions/member-only-event>) because they threw what I think is an expected error ("PHP Fatal error: Uncaught Error: Cannot access protected property Smarty\Smarty::$template\_dir in /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty5/Smarty.php:37") for extensions that were created with an older version of civix.
  
  These extensions provided some useful value (automatically populating the county of each contact or event address makes it easier to get counts as to where members and events are/have been at the county level; we sometimes have events that are only open to higher tiers first, and then lower tiers as space permits, and using the waitlist functionality works but is significant extra manual effort), but I'd rather get up to Smarty v5 before it becomes a requirement.
  
  My main question is... has anyone just re-run civix on these extensions, and did that work? Functionally it does do some sort of update, but there are a lot of questions asked during this process which I'm not sure how to answer. I did put in an issue report on all but the Geodata filler one (as that's been archived?).
  
  Thanks for any info for suggestions you can provide.
  
  username_0
  
  **Tags:** upgrade, smarty, civix
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-10-27. Score: 0 | Accepted answer
  
  `civix upgrade` would always be the first step if you get those template errors. You can almost always answer yes to all the questions.
  
  There might be a few more things beyond that, like if they use php functions in the smarty tpl files, or sometimes it doesn't like the quoting in evaluated variables. But the civix upgrade should get you most of the way there.
  
  
  ---
  
  ### Answer by username_0 on 2024-10-27. Score: 0
  
  Thanks again, username_1. I was successfully able to uninstall / civix upgrade taking default answers / re-install the two extensions that I needed and so far things seem to be running fine in Smarty v5.
  
  
  ---
  
  