CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-03-07T07:27:22Zhttps://lab.civicrm.org/dev/core/-/issues/4162Up/down arrow on pager on a contact's Events tab doesn't do the right thing.2023-03-07T07:27:22ZDaveDUp/down arrow on pager on a contact's Events tab doesn't do the right thing.1. Find a contact that has attended 51+ events. Note you can use the api Participant.create to quickly generate some records against the same event+contact since otherwise this is a lot of clicking.
* Note even if you change the defau...1. Find a contact that has attended 51+ events. Note you can use the api Participant.create to quickly generate some records against the same event+contact since otherwise this is a lot of clicking.
* Note even if you change the default pager size at search settings it seems hardcoded to 50.
1. Visit the contact's events tab.
1. Click the up arrow on the pager page control.
1. It takes you to a new register participant form instead of the next page.
The next/last links work ok.
What's interesting is that the url in the network tab seems correct, and if you visit it standalone it does seem to run the event search form correctly. So I suspect something about the context is getting lost in the session. The relevant code might be in CRM_Event_Page_Tab.https://lab.civicrm.org/dev/core/-/issues/4161Regression: Visiting contribution page while logged in and CiviMember is disa...2023-03-07T05:54:51ZJonGoldRegression: Visiting contribution page while logged in and CiviMember is disabled causes a fatal error.Overview
----------------------------------------
This one is my fault. PR is https://github.com/civicrm/civicrm-core/pull/25729.
Reproduction steps
----------------------------------------
1. Disable CiviMember.
1. Visit a contributio...Overview
----------------------------------------
This one is my fault. PR is https://github.com/civicrm/civicrm-core/pull/25729.
Reproduction steps
----------------------------------------
1. Disable CiviMember.
1. Visit a contribution page whilel logged in.
Current behaviour
----------------------------------------
```
Civi\API\Exception\NotImplementedException: Membership API is not available because CiviMember component is disabled in /home/jon/local/mysite/web/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php on line 454
```
Expected behaviour
----------------------------------------
No fatal error.
Comments
----------------------------------------
I replaced code that used the BAO to look up membership info with a call to a shared function that uses API4. However, API4 will throw an error if you access a disabled entity.5.59.1JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4160Convert html special chars to their ascii equivalent in ical file generation2023-03-07T07:26:05ZyashodhaConvert html special chars to their ascii equivalent in ical file generationWhen an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics...When an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics. All html tags are stripped from the text, however special chars that have been converted to their html code are not converted back to ASCII in the .ics.
We need to update the generation of the .ics file to include the conversion of html char code back to ASCII equivalent.
e.g.
- è ; > è
- " ; > "
- Â ; > Â
-   ; > [space]
(put the space before ; so that one can see the char code)
etc...yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4159CiviBuild with Redis crashes when `Redis` has list of extensions cached & `ci...2023-03-07T07:25:36ZeileenCiviBuild with Redis crashes when `Redis` has list of extensions cached & `civibuild create` calledJust noting down the suggested fix
suppose that cv core:install generates civicrm.settings.php and includes a constant:
define('CIVICRM_DEPLOY_ID', 'SoMe_RaNdOM_1234')
the CIVICRM_DEPLOY_ID would be reset each time you reinstall. it co...Just noting down the suggested fix
suppose that cv core:install generates civicrm.settings.php and includes a constant:
define('CIVICRM_DEPLOY_ID', 'SoMe_RaNdOM_1234')
the CIVICRM_DEPLOY_ID would be reset each time you reinstall. it could be included as part of the prefix/key for memcache/redis and php-cache-files
s.t. if you do a civibuild reinstall, any cache derived from CIVICRM_DEPLOY_ID is guaranteed to be resethttps://lab.civicrm.org/dev/core/-/issues/4158New PaypalPro Recurring Payments (PPRP) creating duplicate contributions and ...2023-03-11T01:16:48ZStoobNew PaypalPro Recurring Payments (PPRP) creating duplicate contributions and inaccurate statusPaypal Recurring Payments Pro (aka PPRP) seems to be having an issue introduced somewhere between 5.49 and 5.57. 5.58 hasn't fixed it.
The issue has two incorrect behaviors:
1. creates duplicate Contributions (both status Completed) ...Paypal Recurring Payments Pro (aka PPRP) seems to be having an issue introduced somewhere between 5.49 and 5.57. 5.58 hasn't fixed it.
The issue has two incorrect behaviors:
1. creates duplicate Contributions (both status Completed) and sends two email receipts when the Recurring Plan (In Progress) is created successfully. One Contribution contains the Invoice ID and the other contains the Transaction ID. On the Paypal side there is only one payment and only one recurring plan.
2. if the credit card fails, the recurring plan and a _single_ Contribution are created in Civi with incorrect status. The Contribution has an Invoice ID but no Transaction ID. The recurring plan exists at Paypal but isn't active at Paypal. No transaction exists at Paypal.
@JonGold because we have talked about other Paypal Pro issues recently I'm looping you in
@eileen because of https://github.com/civicrm/civicrm-core/commit/ba2fb5afa3aa403467ae4934731684cc51bc830d I'm asking you please if your commit may be related
We have done the following testing
- identified that Paypal Standard doesn't have the same problem
- removed custom php code, tpl, and extensions that might have been interfering
Because of the sensitive nature of the donor data I haven't posted any screenshots, but we have several examples to show privately to those interested in helping fix. Bounty and/or consulting $ are available for discussion.5.59.2https://lab.civicrm.org/dev/core/-/issues/4157Mailpoet plugin conflict with Html2Text breaks reports and emails2023-03-23T16:27:08ZniamhMailpoet plugin conflict with Html2Text breaks reports and emailsOverview
----------------------------------------
After upgrading to 5.54.1 back in November (and several subsequent upgrades), a conflict with MailPoet plugin is causing the error below to occur when receipt emails are being sent result...Overview
----------------------------------------
After upgrading to 5.54.1 back in November (and several subsequent upgrades), a conflict with MailPoet plugin is causing the error below to occur when receipt emails are being sent resulting in failure to send. It is also affecting the running of any report if any filter is enabled on report.
__Error thrown__
__Call to undefined method Html2Text\Html2Text::getText()__
See stack exchange:
https://civicrm.stackexchange.com/questions/42921/reports-failing-after-upgrade-whenany-filter-enabled
and
https://civicrm.stackexchange.com/questions/43502/civicrm-mailpoet-plugin-conflict-with-html2text
Reproduction steps
----------------------------------------
Disable MailPoet plugin and all works perfectly. With plugin enabled, error as above in the situations noted. Manual email receipts also failing when MailPoet enabled.
Current behaviour
----------------------------------------
We can fix this temporarily by replacing the MailPoet version of html2text with the CiviCRM version, but this is overwritten every time MailPoet is upgraded.
Expected behaviour
----------------------------------------
There was no compatibility issue for the last 7 years between MailPoet and CiviCRM re this issue.
Environment information
----------------------------------------
* __CiviCRM:__ From 5.54.1 onwards (currently 5.55.0) but we hadn't upgraded in some time so unclear when bug was introduced.
* __PHP:__ 7.4 & also 8.1
* __CMS:__ Wordpress 6.1.1
* __MailPoet:__ 4.6.2 and earlier
Comments
----------------------------------------
Happy to open ticket with MailPoet if necessary.https://lab.civicrm.org/dev/core/-/issues/4156Individual's Employer and Membership by Relationship Are Not Updated After Me...2023-05-18T21:54:45ZLKuttnerIndividual's Employer and Membership by Relationship Are Not Updated After Merging Their OrganizationAfter merging duplicate organizations where the retained record has an updated organization name, the Employer field of employees keeps the organization name of the deleted duplicate record and the current membership by relationship is n...After merging duplicate organizations where the retained record has an updated organization name, the Employer field of employees keeps the organization name of the deleted duplicate record and the current membership by relationship is not applied. In most cases, the Employer name from the deleted record is displayed on the Summary page, though occasionally the field will be blank. In the blank field situation, when we click Edit Info, the quick edit dialog displays the Employer name from the current record relationship, however after clicking Save, the Employer field does not update and remains blank in the Summary.
To get the current employer and membership to apply, we need to view each existing relationship and click Save, though we do not need to actually change anything. After doing that, the Employer field and the memberships by relationship are updated. This behavior is different from what we experienced in the years prior to updating to CiviCRM 5.55.1 and requires much manual checking and updating. We are on Drupal 7.9.2. Thank you for any insight into this.5.61.0https://lab.civicrm.org/dev/core/-/issues/41555.59 upgrade brings down entire site if multilingual is enabled2023-03-07T05:52:57ZJonGold5.59 upgrade brings down entire site if multilingual is enabledTo replicate, have a Civi 5.58 site, enable multilingual, and upgrade to 5.59.
You'll start seeing WSODs with `DB Error: -32`. My further research found `ERROR 1054 (42S22): Unknown column 'nasco_dev_civi.civicrm_custom_field.mask' in '...To replicate, have a Civi 5.58 site, enable multilingual, and upgrade to 5.59.
You'll start seeing WSODs with `DB Error: -32`. My further research found `ERROR 1054 (42S22): Unknown column 'nasco_dev_civi.civicrm_custom_field.mask' in 'field list'`.
Because the custom field table is multilingual-enabled, and the multilingual views seem to not be rebuilt (or rebuilt after the `mask` column is dropped), the views reference a non-existent field and everything stops working.
For folks who already upgraded and are in this situation, you have some options:
If you can run API commands from the command line, you can run `System.rebuildmultilingualschema`, e.g.:
```
cv api System.rebuildmultilingualschema
drush cvapi System.rebuildmultilingualschema
wp civicrm api System.rebuildmultilingualschema
```
NOTE: The above approach worked temporarily for me, but then stopped working. However, I'm not sure if my further testing affected this.
This second approach is less well-tested, but you made a backup before you upgraded...right? If not, back up now:
* Identify the views associated with `civicrm_custom_field` - e.g. `civicrm_custom_field_en_US`, `civicrm_custom_field_es_MX`, etc.
* Run the following commands once per language you have installed. In this command, I'm fixing `_en_US`. Run this once per language, doing a search/replace on the text below to change out `en_US` for your languages. E.g. I have `en_US` and `es_MX`, so I ran this once unmodified, then did a search/replace for `en_US` to `es_MX`.
```
DROP VIEW civicrm_custom_field_en_US;
CREATE VIEW `civicrm_custom_field_en_US` AS select `civicrm_custom_field`.`id` AS `id`,`civicrm_custom_field`.`custom_group_id` AS `custom_group_id`,`civicrm_custom_field`.`name` AS `name`,`civicrm_custom_field`.`data_type` AS `data_type`,`civicrm_custom_field`.`html_type` AS `html_type`,`civicrm_custom_field`.`default_value` AS `default_value`,`civicrm_custom_field`.`is_required` AS `is_required`,`civicrm_custom_field`.`is_searchable` AS `is_searchable`,`civicrm_custom_field`.`is_search_range` AS `is_search_range`,`civicrm_custom_field`.`weight` AS `weight`,`civicrm_custom_field`.`attributes` AS `attributes`,`civicrm_custom_field`.`javascript` AS `javascript`,`civicrm_custom_field`.`is_active` AS `is_active`,`civicrm_custom_field`.`is_view` AS `is_view`,`civicrm_custom_field`.`options_per_line` AS `options_per_line`,`civicrm_custom_field`.`text_length` AS `text_length`,`civicrm_custom_field`.`start_date_years` AS `start_date_years`,`civicrm_custom_field`.`end_date_years` AS `end_date_years`,`civicrm_custom_field`.`date_format` AS `date_format`,`civicrm_custom_field`.`time_format` AS `time_format`,`civicrm_custom_field`.`note_columns` AS `note_columns`,`civicrm_custom_field`.`note_rows` AS `note_rows`,`civicrm_custom_field`.`column_name` AS `column_name`,`civicrm_custom_field`.`option_group_id` AS `option_group_id`,`civicrm_custom_field`.`filter` AS `filter`,`civicrm_custom_field`.`in_selector` AS `in_selector`,`civicrm_custom_field`.`serialize` AS `serialize`,`civicrm_custom_field`.`label_en_US` AS `label`,`civicrm_custom_field`.`help_pre_en_US` AS `help_pre`,`civicrm_custom_field`.`help_post_en_US` AS `help_post` from `civicrm_custom_field`
```5.59.1https://lab.civicrm.org/dev/core/-/issues/4154Number field input validation does not respect decimal separator setting2024-03-20T10:36:25ZnoahNumber field input validation does not respect decimal separator settingOverview
----------------------------------------
This issue has to do with "number" (float) custom fields on some edit forms. When you enter a number containing any character other than a digit or a period (full stop) into such a field,...Overview
----------------------------------------
This issue has to do with "number" (float) custom fields on some edit forms. When you enter a number containing any character other than a digit or a period (full stop) into such a field, validation fails. This happens even if the offending character has been set as the decimal separator in Civi's localization settings.
Reproduction steps
----------------------------------------
1. Under Administer > Localization > Languages, Currency, Locations, set "Decimal Delimiter" to "," (comma).
1. Create a custom field extending Activities. Data type: Number.
1. Add a new activity. In the number field, enter a number that includes a comma, such as "123,45" (one hundred twenty three and forty-five one-hundredths).
1. Press Save.
Current behaviour
----------------------------------------
Validation fails with the error message "[Custom Field Label] must be a number (with or without decimal point)."
Expected behaviour
----------------------------------------
The form should save the entered amount as (float) one hundred twenty three and forty-five one-hundredths.
Environment information
----------------------------------------
CiviCRM 5.60 (current master HEAD).
Comments
----------------------------------------
Somewhat entangled with #41525.68.0https://lab.civicrm.org/dev/core/-/issues/4153Search kit - address issues2023-03-03T03:07:50ZeileenSearch kit - address issuesA user tried to configure a search & I have pasted the export of it below the screenshot. She hit 2 issues - one is just a 'The UI is hard` thing and the other is a probable bug
The UI issue is that she chose the `Country` from the `pri...A user tried to configure a search & I have pasted the export of it below the screenshot. She hit 2 issues - one is just a 'The UI is hard` thing and the other is a probable bug
The UI issue is that she chose the `Country` from the `primary_address` pseudo rather than the `Contact Address` table in the join
![image](/uploads/03a794ec7de2bfea66144b179beb35a5/image.png)
The probably bug is that `Primary Address.Country` can be added to the select fields - but not `Primary Address.street_address` - she realised she had a mix - which is when she contacted me
![image](/uploads/e9f75c3c6f8decff9e9e5bd0c5b9d3c9/image.png)
```
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "test_search",
"label": "Test Search",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"id",
"display_name",
"first_name",
"last_name",
"GROUP_CONCAT(DISTINCT Contact_Address_contact_id_01.street_address) AS GROUP_CONCAT_Contact_Address_contact_id_01_street_address",
"address_primary.city",
"address_primary.state_province_id:label",
"GROUP_CONCAT(DISTINCT Contact_Address_contact_id_01.postal_code) AS GROUP_CONCAT_Contact_Address_contact_id_01_postal_code",
"address_primary.country_id:label"
],
"orderBy": [],
"where": [
[
"contact_type:name",
"=",
"Individual"
]
],
"groupBy": [
"id"
],
"join": [
[
"Address AS Contact_Address_contact_id_01",
"INNER",
[
"id",
"=",
"Contact_Address_contact_id_01.contact_id"
],
[
"Contact_Address_contact_id_01.street_address",
"IS NOT EMPTY"
],
[
"address_primary.country_id",
"IN",
[
"1228",
"1039"
]
]
],
[
"Contribution AS Contact_Contribution_contact_id_01",
"INNER",
[
"id",
"=",
"Contact_Contribution_contact_id_01.contact_id"
],
[
"Contact_Contribution_contact_id_01.total_amount",
"BETWEEN",
[
"250.00",
"499.99"
]
],
[
"Contact_Contribution_contact_id_01.receive_date",
">=",
"\"2018-07-01\""
]
]
],
"having": []
},
"expires_date": null,
"description": null
}
],
"match": [
"name"
]
}
]
]
```https://lab.civicrm.org/dev/core/-/issues/4152Data integrity issue: Some number fields change their values during data entry2023-03-24T02:46:14ZnoahData integrity issue: Some number fields change their values during data entryOverview
----------------------------------------
On some edit forms, when a number containing a comma is entered into a "number" (float) custom field, validation fails. This is reasonable behaviour if the decimal separator is something ...Overview
----------------------------------------
On some edit forms, when a number containing a comma is entered into a "number" (float) custom field, validation fails. This is reasonable behaviour if the decimal separator is something other than the comma character. (See related issue regarding validation and decimal separators: #4154)
However, in the re-displayed form, the value is silently changed, with everything after the comma stripped off. For example, "50,995.22" is changed to "50". The user is given another chance to submit the form, and if they don't notice the (incorrect) changed value, that incorrect value will be saved.
Reproduction steps
----------------------------------------
1. Create a custom field extending Activities. Data type: Number.
2. Add a new activity. In the number field, enter a number that includes a comma, such as "12,345".
Current behaviour
----------------------------------------
The first attempt to save the form fails. It is redisplayed. The second attempt succeeds. However, the number field has been changed -- the comma and everything to the right of it has been removed.
![comma](/uploads/8390d965ab04bb439a8f8c5b778c64c1/comma.gif)
Expected behaviour
----------------------------------------
Even if validation fails, the contents of the number field should not change without the user's intervention.
Environment information
----------------------------------------
CiviCRM master (5.60)
Notes
----------------------------------------
This issue happens in Activity edit forms (notably, _not_ Contact edit forms), but it may happen elsewhere too. I haven't tracked it down entirely, but the error seems to happen during the re-rendering of the form: `\CRM_Core_QuickForm_Action_Display::renderForm()`. Maybe in the Smarty layer?5.61.0https://lab.civicrm.org/dev/core/-/issues/4151Contact links for SearchKit (List) Display Name fields are randomly incorrect2024-01-29T19:51:17ZJoeMurrayContact links for SearchKit (List) Display Name fields are randomly incorrectOverview
----------------------------------------
When SearchKit results contain a transformed List field of Display Name, each value in list should link to the Display Name contact's record. dmaster currently does not for some contacts ...Overview
----------------------------------------
When SearchKit results contain a transformed List field of Display Name, each value in list should link to the Display Name contact's record. dmaster currently does not for some contacts in concatenated list of Display Names.
https://civicrm.stackexchange.com/questions/43607/searchkit-incorrect-contact-profile-opening-from-list-display-name-column
Reproduction steps
----------------------------------------
See https://civicrm.stackexchange.com/questions/43607/searchkit-incorrect-contact-profile-opening-from-list-display-name-column .
Expected behaviour
----------------------------------------
Display Names in list should link to correct contacts.
Environment information
----------------------------------------
dmaster on Feb 28, 2023.
Comments
----------------------------------------
_Anything else you would like the reviewer to note._colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4150Formbuilder: Contact Reference doesn't respect the Filter options and exposes...2023-03-07T19:59:37ZshaneonabikeFormbuilder: Contact Reference doesn't respect the Filter options and exposes all Contacts## Problem
Creating a Form (via Formbuilder) that uses a Contact Reference exposes all Contacts in the search field rather than respecting the Filter conditions.
## How to reproduce
1. Create a set of Custom Fields one of which that h...## Problem
Creating a Form (via Formbuilder) that uses a Contact Reference exposes all Contacts in the search field rather than respecting the Filter conditions.
## How to reproduce
1. Create a set of Custom Fields one of which that has a Contact Reference with a Filter by a Group
2. Create a Formbuilder Form and add the Contact Reference field
3. Test the form, and see that all Contacts are searchable
## Expected Result
Formbuilder should use the appropriate filters set by the Contact Reference rather than exposing all users.https://lab.civicrm.org/dev/core/-/issues/4149User editable Message Templates, the Contact Action: Send an Email and the Co...2023-03-29T21:09:22Zjustinfreeman (Agileware)User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and double quotes (")User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and do...User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and double quotes (").
So if you use a Smarty Token like:
```{contribution.receive_date|crmDate:"%E%f %B %Y"}```
```{contribution.receive_date|crmDate:'%E%f %B %Y'}```
When CKEditor 4 parses the HTML it converts this into:
```{contribution.receive_date|crmDate:"%E%f %B %Y"}```
```{contribution.receive_date|crmDate:'%E%f %B %Y'}```
Effectively rendering the crmDate function unusable in these situations.
Using CKEditor 5 does solve this specific problem, however CKEditor 5 introduces new problems such as the inability for users to resize images, loss of some formatting controls and importantly prevents the ability to view/edit the source HTML.
Agileware Ref: CIVICRM-21035.61.0https://lab.civicrm.org/dev/core/-/issues/4148SearchKit: Add Actions to Grid Display2023-03-07T07:10:53ZyurgSearchKit: Add Actions to Grid DisplayOverview
----------------------------------------
SearchKit Grid Display lacks "Actions" menu
Example use-case
----------------------------------------Overview
----------------------------------------
SearchKit Grid Display lacks "Actions" menu
Example use-case
----------------------------------------https://lab.civicrm.org/dev/core/-/issues/4147When using PHP 8.1, the Contact token for the Address State / Province field ...2023-03-03T04:47:08Zjustinfreeman (Agileware)When using PHP 8.1, the Contact token for the Address State / Province field returns no value when used in Message Templates. Works fine on PHP 7.4When using PHP 8.1, the Contact token for the Address **State / Province** field returns no value when used in Message Templates. Works fine on PHP 7.4.
These are the tokens that return no value:
```{contact.address_primary.state_provi...When using PHP 8.1, the Contact token for the Address **State / Province** field returns no value when used in Message Templates. Works fine on PHP 7.4.
These are the tokens that return no value:
```{contact.address_primary.state_province_id:abbr}```
```{contact.state_province}```
Other Contact tokens for contact fields and address return a value correctly.
Agileware Ref: CIVICRM-2102https://lab.civicrm.org/dev/core/-/issues/4146Upgrade Smarty to Smarty3+2024-01-03T19:48:39ZeileenUpgrade Smarty to Smarty3+This is a meta issue for looking at moving from Smarty2 to Smarty3+
**Status as of 5.68 - Smarty3 is optional, It is recommended in 5.69 as the preferred version**
to enable - add a define to `civicrm_settings.php` like this (adjust...This is a meta issue for looking at moving from Smarty2 to Smarty3+
**Status as of 5.68 - Smarty3 is optional, It is recommended in 5.69 as the preferred version**
to enable - add a define to `civicrm_settings.php` like this (adjust sample path as desired)
```
if (!defined('CIVICRM_SMARTY3_AUTOLOAD_PATH')) {
define('CIVICRM_SMARTY3_AUTOLOAD_PATH', $civicrm_root . '/packages/smarty3/vendor/autoload.php');
}
```
**Gaps as of 5.68**
- [x] resolve Sections section of civi-report https://github.com/civicrm/civicrm-core/pull/27777
- [x] the online membership receipt has an instance of 'crmMoney maths' - this should be the same as other templates - I'm just struggling to understand the double contribution thing with separate membership payment
- [ ] not all extensions are compatible - see below
**Things that cause compatibility issues** (resolve in core with the exception of the 2 listed)
- **maths** in Smartyv2 {$amount+$taxAmount|crmMoney} is implicitly `{($amount+$taxAmount)|crmMoney}` - whereas in Smarty3 it does not resolve correctly without the braces - which Smarty2 does not support. Generally the maths can be moved to the php layer
- Extensions with CiviX versions lower than 23.01 - mostly these only cause notices & smarty files will not load - although some very old civix versions will cause a hard fail. Running civix will remove these lines
![image](/uploads/6ec4b8e83ac6fa02c1ec6d0bec57bac8/image.png)
And add in the smarty mixin if smarty files are in use
- Accessing the smarty property `_tplVars` directly (in most cases running civix will fix)
- usage of `{php}` within tpl files
- incorrect variable assignments in templates for correct quotes and backticks, e.g.
```
{assign var="foo" value="bar-`$something.else`"}
```
if a variable is being concatenated into a string in a template, the string should be surrounded by double quotes, not single. If the variable name contains characters other than a-zA-Z0-9_ (e.g. a period), then it needs to be surrounded by backticks. If a variable is an int and you're doing math, don't use backticks (e.g. `value=$one.thing+1`).
**Why smarty3**
1. Accessing documentation is less confusing as Smarty documentation targets v3+
2. Smarty3 is more secure - in part because it has security releases, in part because escaping is on by default - which actually still seems disabled in the working version - but it makes sense to upgrade smarty first
3. Smarty3 is more efficient in handling one-off strings. We have kinda hacked this into Smartyv2 with a combination of the core function `CRM_Utils_String::parseOneOffStringThroughSmarty` and hacking some security into `fetch` but under volume this can result in #4143 and also reads & writes to disk more than is ideal
4. The work to get to Smarty4 is the same as the work to get to Smarty3 (mostly done) + an unknown extra amount of work. Not a bad thing to do but a big scope creep
5. In theory `Smarty3` is a relatively [seemless upgrade from Smartyv2](https://github.com/smarty-php/smarty/blob/v3.1.47/SMARTY_2_BC_NOTES.txt).
**Things that need to be done in extensions**
Other than the first item these are fairly uncommong
1) run `civix upgrade` on extensions where [the civix version of the extension is 23.01 or lower](https://github.com/civicrm/civicrm-core/pull/27565#issuecomment-1732155043). (it's worth making sure you have the [latest civix first](https://github.com/totten/civix/tree/master)
4) test any unusual smarty screens
**Challenges outstanding**
1) When we are happy from a QA point ov view we need to roll it out as part of our package. At that point we will need to decide if it is opt in & what that looks like or whether it is a hard-switch.
** Challenges that we are doing OK on **
- **Autoloading** - works OK if extensions are updated to recent civix.
- **Function Naming** - Smarty3 has renamed a bunch of functions - eg `register_resource` becomes `registerResource`. This seems to be manageable with [a compatibility class](https://github.com/civicrm/civicrm-core/pull/27585) - allowing us to switch to the forward compatible function names. Note it really is mostly (maybe only) core that interacts with these functions
- **Fetch override** - We have overridden the `fetch` function to try to mimic Smartyv3 security in v2 - this function has a different signature in `v3` so overriding it is a noisy experience. [Solution is to move our patches to Smartyv2 packages](https://github.com/civicrm/civicrm-core/pull/27588)
- **Escape by default** - so far this seems to have not been enabled on Smarty3 - I think it's fine to defer worrying about it until the upgrade is done if it is not hurting us
- **Invalid Smarty Syntax** - so far I have identified that the use of '`' in Smarty causes a hard crash - we don't do this much, mostly in older code... @larssg has done a [pretty solid clean up in core](https://github.com/civicrm/civicrm-core/pull/27547) but there could be some in extensions
- **Direct access of class properties** - we have a couple of places that do things like `$smarty->_tpl_vars` - those need replacing with `get_template_vars or, if we add compatibility `getTemplateVars`
- **Register String Resource** - this is not an issue for `v3` but is the current blocker on `v4` the parameter type in our function `civicrm_smarty_register_string_resource` is an `array` but that is not v4-compatible
**Related**
https://lab.civicrm.org/dev/core/-/issues/4618https://lab.civicrm.org/dev/core/-/issues/4145Administrator > Communications > Schedule Reminders error when CiviEvent disa...2023-03-02T03:14:44ZmarcusjwilsonAdministrator > Communications > Schedule Reminders error when CiviEvent disabledOverview
----------------------------------------
When trying to access Administrator > Communications > Schedule Reminders on CiviCRM 5.57.0 with CiviEvent disabled, we see an error.
""
Reproduction steps
-----------------------------...Overview
----------------------------------------
When trying to access Administrator > Communications > Schedule Reminders on CiviCRM 5.57.0 with CiviEvent disabled, we see an error.
""
Reproduction steps
----------------------------------------
1. Disable CiviEvent component.
2. Select Administrator > Communications > Schedule Reminders.
3. Got an error "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Event API is not available because CiviEvent component is disabled".
Expected behaviour
----------------------------------------
Prior to 5.57.0 the user was able to access this admin page without having CiviEvent enabled.
Environment information
----------------------------------------
* __CiviCRM:__ _5.7...._
* __PHP:__ _7.4__
* __CMS:__ _WordPress 5.8.1_
* __Database:__ _MySQL 5.7.7_
* __Web Server:__ _Nginx..._5.59.0https://lab.civicrm.org/dev/core/-/issues/4144Notice on `isDuplicate` on profile form2023-03-18T04:57:08ZeileenNotice on `isDuplicate` on profile formMost profile screens show this notice.... depending on smarty mode / php version
![image](/uploads/ba2d754f522299cfb57ab10184e701ae/image.png)
The issue is that `isDuplicate` is ONLY assigned when form validation occurs and then ONLY i...Most profile screens show this notice.... depending on smarty mode / php version
![image](/uploads/ba2d754f522299cfb57ab10184e701ae/image.png)
The issue is that `isDuplicate` is ONLY assigned when form validation occurs and then ONLY in a very specific scenario
From the url
civicrm/profile/create?reset=1&context=dialog&gid=5
If the contact matches an existing organization it fails & the duplicate contact code is invoked.
This url only appears in the context of an **EntityReference field** - ie if you go to enter employer & then choose 'new Organization' - @colemanw just wondering if you have any ideas about a more sane way to do this?5.61.0https://lab.civicrm.org/dev/core/-/issues/4143Smarty bus errors2023-02-24T22:05:21ZeileenSmarty bus errorsSmarty can show bus errors under load
See
Truncating a compiled template leads to concurrency issues if another process is including the same file. See also CRM-11189 for a description of the "bus error" encountered when one of the co...Smarty can show bus errors under load
See
Truncating a compiled template leads to concurrency issues if another process is including the same file. See also CRM-11189 for a description of the "bus error" encountered when one of the concurrent processes dies.
CRM-19013: Compiled templates are truncated
CRM-11189: When CiviMail renders smarty templates for mailing, it saves them to disk
https://github.com/civicrm/civicrm-packages/pull/158