Development issueshttps://lab.civicrm.org/groups/dev/-/issues2022-12-06T04:17:29Zhttps://lab.civicrm.org/dev/core/-/issues/4020Remove unsupported reCAPTCHA options2022-12-06T04:17:29ZJKingsnorthRemove unsupported reCAPTCHA optionsThe reCaptcha settings page includes the 'reCAPTCHA options' input. This was used by reCAPTCHA v1, which has been unsupported for a long time: https://developers.google.com/recaptcha/old/docs/customization
![image](/uploads/da430b31652...The reCaptcha settings page includes the 'reCAPTCHA options' input. This was used by reCAPTCHA v1, which has been unsupported for a long time: https://developers.google.com/recaptcha/old/docs/customization
![image](/uploads/da430b31652f3f0f0daefcbe842761af/image.png)
I suggest that we remove the recaptchaOptions input and settings, to tidy up the form.
It is possible to apply some styling options to recaptcha v2+, which has been implemented in FormBuilder:
![image](/uploads/c0fdbe280210f391040c461f5c0d9f0e/image.png)
But I do not suggest adding this functionality to the general reCaptcha form. If someone feels strongly, they could add it as a series of radio/checkbox options, instead of a text string which is how the options for v1 were stored.5.57.0https://lab.civicrm.org/dev/core/-/issues/4015Import templates2023-04-03T02:33:03ZeileenImport templatesOne hope for the import screens is that on the `DataSource` screen it would be possible to put `template_id` in the url. In this case the settings from that import would load (excluding the actual file/data/table).
I think the template_...One hope for the import screens is that on the `DataSource` screen it would be possible to put `template_id` in the url. In this case the settings from that import would load (excluding the actual file/data/table).
I think the template_id could be an import that had been used or one marked as 'is_template' (the latter would ideally be saveable and would not expire like the job ones do).5.61.0https://lab.civicrm.org/dev/core/-/issues/4014[documentation] fileinfo PHP extension not listed as requirement2022-12-06T22:57:56Zjensschuppe[documentation] fileinfo PHP extension not listed as requirement44b5fdddd0722095762b648cb17faf566e229ba7 ([PR](https://github.com/civicrm/civicrm-core/pull/21351)) added the `phpoffice/phpspreadsheet` package as a dependency in Core's `composer.json` which in turn requires `ext-fileinfo`, leading to ...44b5fdddd0722095762b648cb17faf566e229ba7 ([PR](https://github.com/civicrm/civicrm-core/pull/21351)) added the `phpoffice/phpspreadsheet` package as a dependency in Core's `composer.json` which in turn requires `ext-fileinfo`, leading to composer failing at reconciling dependencies after `5.44.0` if that PHP extension is missing. The [docs](https://docs.civicrm.org/installation/en/latest/general/requirements/#php-extensions) do not list it as a requirement.5.57.0https://lab.civicrm.org/dev/core/-/issues/4013Regression: Error when editing search preferences2023-01-05T01:40:51ZJonGoldRegression: Error when editing search preferencesTo replicate:
* Go to **Administer » Customize Data and Screens » Search Preferences**.
* Change the default pager limit to anything and save.
* Visit the **Search Preferences** page again.
Expected Result:
No errors.
Actual Result:
``...To replicate:
* Go to **Administer » Customize Data and Screens » Search Preferences**.
* Change the default pager limit to anything and save.
* Visit the **Search Preferences** page again.
Expected Result:
No errors.
Actual Result:
```
Warning: array_flip() expects parameter 1 to be array, string given in CRM_Admin_Form_Setting::reorderSortableOptions() (line 380 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: array_merge(): Expected parameter 1 to be an array, null given in CRM_Admin_Form_Setting::reorderSortableOptions() (line 380 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: array_flip() expects parameter 1 to be array, null given in CRM_Admin_Form_Setting->addFieldsDefinedInSettingsMetadata() (line 224 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: Invalid argument supplied for foreach() in CRM_Core_Form->addCheckBox() (line 1418 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php).
```
Note that this is on dmaster.demo.c.o, running PHP 7.4. PHP 8+ will throw a fatal error here.
I don't have time to work on this today but if no one else has a minute, I can devote some of Brienne's time Thursday/Friday.5.57.0https://lab.civicrm.org/dev/core/-/issues/4012Contribution Page credit card expiry months are incorrectly offset when the t...2022-12-17T23:11:48ZbgmContribution Page credit card expiry months are incorrectly offset when the timezone is WhitehorseFound an interesting bug that only happens with users who have chose the America/Whitehorse timezone (-0700). It does not happen if we chose another similar timezone (America/Vancouver, America/Yellowknife, etc).
To reproduce on dmaster...Found an interesting bug that only happens with users who have chose the America/Whitehorse timezone (-0700). It does not happen if we chose another similar timezone (America/Vancouver, America/Yellowknife, etc).
To reproduce on dmaster / drupal7:
- login as the demo user
- change the user's timezone to America/Whitehorse
Then go to a contribution page:
https://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2
![image](/uploads/ea61f948003f258501391a3c90e2a6e3/image.png)5.58.0https://lab.civicrm.org/dev/core/-/issues/4008Regression - lotsa noise on Searchkit screen if Form code editor enabled2022-12-08T02:47:10ZeileenRegression - lotsa noise on Searchkit screen if Form code editor enabledOn upgrading a dev site with Form Code Editor enabled from 5.54 to 5.56 the search kit screen went 'haywire'. Doing the same on dmaster gave a more modest error display (but the difference is the other site has some aggressive xdebug err...On upgrading a dev site with Form Code Editor enabled from 5.54 to 5.56 the search kit screen went 'haywire'. Doing the same on dmaster gave a more modest error display (but the difference is the other site has some aggressive xdebug error display stuff going on)
![image](/uploads/6a20d0e4ecde37ff138a54381401feb7/image.png)
![image](/uploads/f1d0812dc9daf2ca176e2389c0487432/image.png)
@totten @colemanw unless we are actively deprecating that extension we need to fix (I can disable on the site in question)5.56.0https://lab.civicrm.org/dev/core/-/issues/4000only update `contributionRecur` when `templateContribution` is updated IF it ...2023-03-16T21:47:09Zeileenonly update `contributionRecur` when `templateContribution` is updated IF it is actively marked as suchIn https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of A...In https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of ANY contribution in the series causes it to update. There are good reasons to update individual contributions without any implicit template update.5.61.0https://lab.civicrm.org/dev/core/-/issues/3999Unable to delete Price field2022-11-21T20:52:46ZMonish DebUnable to delete Price fieldSteps to replicate:
2. Create a any kind of price-field (In this example I have created a checkbox field)
1. Created a price set used for any one of the civi component
3. Then delete the price-field
Error:
> Unable to delete the '...Steps to replicate:
2. Create a any kind of price-field (In this example I have created a checkbox field)
1. Created a price set used for any one of the civi component
3. Then delete the price-field
Error:
> Unable to delete the '' Price Field - it is currently in use by one or more active events or contribution pages or contributions or event templates.
Expected: The price set is not used in any donation or event page, then one should be allowed to delete the price-field
Demo:
![after1](/uploads/321c38eaa3707cbb9ac7a6bb020f484f/after1.gif)5.56.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3994Auto renew options for membership types are not saving for a contribution page2023-12-07T00:06:08ZKurund JalmiAuto renew options for membership types are not saving for a contribution pageSteps to replicate on vanilla CiviCRM install
- Membership type configuration
![Screenshot_from_2022-11-18_10-51-50](/uploads/02d45ded17660376a461d6738c287c48/Screenshot_from_2022-11-18_10-51-50.png)
- In the contribution page configur...Steps to replicate on vanilla CiviCRM install
- Membership type configuration
![Screenshot_from_2022-11-18_10-51-50](/uploads/02d45ded17660376a461d6738c287c48/Screenshot_from_2022-11-18_10-51-50.png)
- In the contribution page configuration try to make option 'Required' and save.
![Screenshot_from_2022-11-18_10-52-30](/uploads/9f50922426022defea7b99c53a386def/Screenshot_from_2022-11-18_10-52-30.png)
- However, it not saved
![Screenshot_from_2022-11-18_10-52-41](/uploads/57717f65ddd9e0df971821cafade9752/Screenshot_from_2022-11-18_10-52-41.png)5.69.0Kurund JalmiKurund Jalmihttps://lab.civicrm.org/dev/core/-/issues/3992Expose created date column in contact reports2022-11-16T21:33:39ZyashodhaExpose created date column in contact reportsExpose created date column in contact reports and as filter as well.Expose created date column in contact reports and as filter as well.5.57.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3988Cache race conditions2024-02-16T09:46:55ZJonGoldCache race conditionsA client was asking me to find out why a $2,500 donation failed. I found this error in the logs (full backtrace below):
```
Nov 10 10:58:40 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CR...A client was asking me to find out why a $2,500 donation failed. I found this error in the logs (full backtrace below):
```
Nov 10 10:58:40 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -5
[message] => DB Error: already exists
[mode] => 16
[debug_info] => UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5OiJDb21wbGV0ZWQiO2k6MztzOjk6IkNhbmNlbGxlZCI7aTo0O3M6MTI6IkxlZnQgTWVzc2FnZSI7aTo1O3M6MTE6IlVucmVhY2hhYmxlIjtpOjY7czoxMjoiTm90IFJlcXVpcmVkIjtpOjc7czo5OiJBdmFpbGFibGUiO2k6ODtzOjc6Ik5vX3Nob3ciO2k6OTtzOjY6IlVucmVhZCI7aToxMDtzOjU6IkRyYWZ0Ijt9', created_date = FROM_UNIXTIME(1668095920), expired_date = FROM_UNIXTIME(1668117520) WHERE group_name = "metadata_5_54_1" AND path = "CRM_OG_activitystatus_883f1c0c1790789755f726d1e41232c2" [nativecode=1062 ** Duplicate entry 'metadata_5_54_1-CRM_OG_activitystatus_883f1c0c1790789755f726d...' for key 'UI_group_path_date']
[type] => DB_Error
[user_info] => UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5OiJDb21wbGV0ZWQiO2k6MztzOjk6IkNhbmNlbGxlZCI7aTo0O3M6MTI6IkxlZnQgTWVzc2FnZSI7aTo1O3M6MTE6IlVucmVhY2hhYmxlIjtpOjY7czoxMjoiTm90IFJlcXVpcmVkIjtpOjc7czo5OiJBdmFpbGFibGUiO2k6ODtzOjc6Ik5vX3Nob3ciO2k6OTtzOjY6IlVucmVhZCI7aToxMDtzOjU6IkRyYWZ0Ijt9', created_date = FROM_UNIXTIME(1668095920), expired_date = FROM_UNIXTIME(1668117520) WHERE group_name = "metadata_5_54_1" AND path = "CRM_OG_activitystatus_883f1c0c1790789755f726d1e41232c2" [nativecode=1062 ** Duplicate entry 'metadata_5_54_1-CRM_OG_activitystatus_883f1c0c1790789755f726d...' for key 'UI_group_path_date']
[to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5OiJDb21wbGV0ZWQiO2k6MztzOjk6IkNhbmNlbGxlZCI7aTo0O3M6MTI6IkxlZnQgTWVzc2FnZSI7aTo1O3M6MTE6IlVucmVhY2hhYmxlIjtpOjY7czoxMjoiTm90IFJlcXVpcmVkIjtpOjc7czo5OiJBdmFpbGFibGUiO2k6ODtzOjc6Ik5vX3Nob3ciO2k6OTtzOjY6IlVucmVhZCI7aToxMDtzOjU6IkRyYWZ0Ijt9', created_date = FROM_UNIXTIME(1668095920), expired_date = FROM_UNIXTIME(1668117520) WHERE group_name = "metadata_5_54_1" AND path = "CRM_OG_activitystatus_883f1c0c1790789755f726d1e41232c2" [nativecode=1062 ** Duplicate entry 'metadata_5_54_1-CRM_OG_activitystatus_883f1c0c1790789755f726d...' for key 'UI_group_path_date']"]
)
```
In `CRM_Core_OptionGroup::values()`, we check for a cached result. If we don't find one, we run the query, then cache the result. However, between the `$cache->has()` and `$cache->set()`, this value was added to the cache.
### How to resolve?
It seems to me like there's no way to avoid a race condition without recovering gracefully from this error.
It seems like a failure to write to cache shouldn't be fatal - could we catch `CRM_Utils_Cache_CacheException` and continue execution?
Backtrace
```
Nov 10 10:58:40 [debug] $backTrace = #0 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(954): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/mysiten.org/vendor/pear/pear-core-minimal/src/PEAR.php(944): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /var/www/mysiten.org/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: already exists", -5, 16, (Array:2), "UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#3 /var/www/mysiten.org/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-5, 16, (Array:2), "UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#4 /var/www/mysiten.org/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -5, 16, (Array:2), "UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...", "DB_Error", TRUE)
#5 /var/www/mysiten.org/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#6 /var/www/mysiten.org/vendor/pear/db/DB/mysqli.php(943): DB_common->raiseError(-5, NULL, NULL, "UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...", "1062 ** Duplicate entry 'metadata_5_54_1-CRM_OG_activitystatus_883f1c0c179078...")
#7 /var/www/mysiten.org/vendor/pear/db/DB/mysqli.php(413): DB_mysqli->mysqliRaiseError()
#8 /var/www/mysiten.org/vendor/pear/db/DB/common.php(1234): DB_mysqli->simpleQuery("UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#9 /var/www/mysiten.org/vendor/civicrm/civicrm-packages/DB/DataObject.php(2696): DB_common->query("UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#10 /var/www/mysiten.org/vendor/civicrm/civicrm-packages/DB/DataObject.php(1829): DB_DataObject->_query("UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#11 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/DAO.php(494): DB_DataObject->query("UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...")
#12 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/DAO.php(1675): CRM_Core_DAO->query("UPDATE civicrm_cache SET data = 'YToxMDp7aToxO3M6OToiU2NoZWR1bGVkIjtpOjI7czo5...", FALSE)
#13 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Utils/Cache/SqlGroup.php(137): CRM_Core_DAO::executeQuery("UPDATE civicrm_cache SET data = %1, created_date = FROM_UNIXTIME(%2), expired...", (Array:3), TRUE, NULL, FALSE, FALSE)
#14 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/OptionGroup.php(173): CRM_Utils_Cache_SqlGroup->set("CRM_OG_activitystatus_883f1c0c1790789755f726d1e41232c2", (Array:10))
#15 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/PseudoConstant.php(262): CRM_Core_OptionGroup::values("activity_status", FALSE, FALSE, FALSE, NULL, "name", FALSE, FALSE, "value", "weight")
#16 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/DAO.php(2837): CRM_Core_PseudoConstant::get("CRM_Activity_BAO_Activity", "status_id", (Array:8), "validate")
#17 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Utils/FormattingUtil.php(264): CRM_Core_DAO::buildOptions("status_id", "validate", (Array:10))
#18 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php(530): Civi\Api4\Utils\FormattingUtil::getPseudoconstantList((Array:30), "status_id:name", (Array:10), "create")
#19 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Generic/Traits/DAOActionTrait.php(178): Civi\Api4\Generic\AbstractAction->formatWriteValues((Array:10))
#20 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Generic/DAOSaveAction.php(30): Civi\Api4\Generic\DAOSaveAction->formatWriteValues((Array:10))
#21 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Provider/ActionObjectProvider.php(69): Civi\Api4\Generic\DAOSaveAction->_run(Object(Civi\Api4\Generic\Result))
#22 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOSaveAction))
#23 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php(250): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOSaveAction))
#24 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/BAO/Contribution.php(552): Civi\Api4\Generic\AbstractAction->execute()
#25 /var/www/mysiten.org/vendor/civicrm/civicrm-core/api/v3/utils.php(1319): CRM_Contribute_BAO_Contribution::create((Array:23))
#26 /var/www/mysiten.org/vendor/civicrm/civicrm-core/api/v3/Contribution.php(87): _civicrm_api3_basic_create("CRM_Contribute_BAO_Contribution", (Array:23), "Contribution")
#27 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_contribution_create((Array:23))
#28 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
#29 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#30 /var/www/mysiten.org/vendor/civicrm/civicrm-core/api/api.php(133): Civi\API\Kernel->runSafe("Contribution", "create", (Array:10))
#31 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/BAO/Contribution.php(3848): civicrm_api3("Contribution", "create", (Array:10))
#32 /var/www/mysiten.org/vendor/civicrm/civicrm-core/api/v3/Contribution.php(522): CRM_Contribute_BAO_Contribution::completeOrder((Array:5), NULL, 21523, NULL)
#33 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_contribution_completetransaction((Array:9))
#34 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
#35 /var/www/mysiten.org/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#36 /var/www/mysiten.org/vendor/civicrm/civicrm-core/api/api.php(133): Civi\API\Kernel->runSafe("contribution", "completetransaction", (Array:9))
#37 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Confirm.php(2412): civicrm_api3("contribution", "completetransaction", (Array:9))
#38 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Confirm.php(861): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission("100769")
#39 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Form.php(573): CRM_Contribute_Form_Contribution_Confirm->postProcess()
#40 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php(1472): CRM_Core_Form->mainProcess()
#41 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php(1220): CRM_Contribute_Form_Contribution_Main->skipToThankYouPage()
#42 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Form.php(573): CRM_Contribute_Form_Contribution_Main->postProcess()
#43 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Upload.php(152): CRM_Core_Form->mainProcess()
#44 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Upload.php(119): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
#45 /var/www/mysiten.org/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
#46 /var/www/mysiten.org/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), "upload")
#47 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle("upload")
#48 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(319): CRM_Core_Controller->run((Array:3), NULL)
#49 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:18))
#50 /var/www/mysiten.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#51 /var/www/mysiten.org/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke((Array:3))
#52 /var/www/mysiten.org/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(80): Drupal\civicrm\Civicrm->invoke((Array:3))
#53 [internal function](): Drupal\civicrm\Controller\CivicrmController->main((Array:3), "")
#54 /var/www/mysiten.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array((Array:2), (Array:2))
#55 /var/www/mysiten.org/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#56 /var/www/mysiten.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#57 /var/www/mysiten.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext((Array:2), (Array:2))
#58 /var/www/mysiten.org/vendor/symfony/http-kernel/HttpKernel.php(159): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#59 /var/www/mysiten.org/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#60 /var/www/mysiten.org/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#61 /var/www/mysiten.org/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#62 /var/www/mysiten.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#63 /var/www/mysiten.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#64 /var/www/mysiten.org/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#65 /var/www/mysiten.org/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#66 /var/www/mysiten.org/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#67 /var/www/mysiten.org/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#68 /var/www/mysiten.org/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#69 {main}
```5.61.0https://lab.civicrm.org/dev/core/-/issues/3981Example data leaks from the live database2022-11-11T02:29:04ZeileenExample data leaks from the live databaseThe example data has been adding a pseudo-contact-id. However, if a token is used that is not in the example data it resolves to a 'real live' contact's data.
e.g the contact ID for 'Barb' in the sample data is 100
In my current develo...The example data has been adding a pseudo-contact-id. However, if a token is used that is not in the example data it resolves to a 'real live' contact's data.
e.g the contact ID for 'Barb' in the sample data is 100
In my current developer database Contact 100 is 'Pennsylvania Action Partnership'
![image](/uploads/d394dd447748aca86a4b752c903e5ffc/image.png)
If I go to view the contribution invoice and replace the subject with the token for 'addressee' there is no defined value for 'Barb' so it goes to the database & resolves the value for contact 100.
![image](/uploads/3b2b66050b0c08369cd2dc20d074479b/image.png)
![image](/uploads/fd1024d0ef6042ef853c45387906153b/image.png)
I tried to understand why there is a pseudo-contact-id and I can think of two reasons
1) perception a placeholder value would be less confusing.
2) something didn't work otherwise.
I tried changing the 100 to 0 and apart from tests with a specific expectation it appears to work. Arguably another false value would be better - but it would have to be REALLY BIG to be sure no-one's db has it & I think you could just as well make the case that 0 is less confusing.5.56.0https://lab.civicrm.org/dev/core/-/issues/3979civi/core/Locale->uf doesn't get set usually2022-11-23T18:18:41ZDaveDcivi/core/Locale->uf doesn't get set usuallyThis started as what I thought was a simple php 8.1 warning: `CRM_Core_I18n::singleton()->setLocale('en_US')` gives one of those "don't pass null as a string parameter" warnings. But then I looked into a bit.
1. Unit tests don't catch t...This started as what I thought was a simple php 8.1 warning: `CRM_Core_I18n::singleton()->setLocale('en_US')` gives one of those "don't pass null as a string parameter" warnings. But then I looked into a bit.
1. Unit tests don't catch this because the error is happening when [setting the UF locale](https://github.com/civicrm/civicrm-core/blob/98b99133c1b5b8f7c093c8426f26316444420695/CRM/Utils/System/DrupalBase.php#L453), and in the unit test UF it [doesn't do anything](https://github.com/civicrm/civicrm-core/blob/98b99133c1b5b8f7c093c8426f26316444420695/CRM/Utils/System/Base.php#L519).
2. The only way the parameter is not null is if the `uf` member of \Civi\Core\Locale gets set. But that only happens when code is doing things in a way that nobody (currently) does things. It doesn't happen by calling `CRM_Core_I18n::singleton()->setLocale()`.
3. In drupal 7 in a stock install, these get swallowed and don't even appear on screen. You can see them if you comment out [this line](https://git.drupalcode.org/project/drupal/-/blob/9f59535277d2bcaf7ad4555b12e62ddc4fac372f/includes/bootstrap.inc#L2692), and then do e.g. `cv ev "CRM_Core_I18n::singleton()->setLocale('en_US');"`.
4. Looks like it's from https://github.com/civicrm/civicrm-core/commit/1190626dc6669a5a9242ab788a64d058e42dd9cb.
5. I'm a little scared to touch setLocale().5.56.0tottentottenhttps://lab.civicrm.org/dev/core/-/issues/3978Sample data price sets not showing correctly2022-11-17T22:54:04ZeileenSample data price sets not showing correctlyPer https://lab.civicrm.org/dev/core/-/issues/3685#note_83376
Note the issue is the FinancialType ACls require a financial type ID - it should be there BUT the financial type ID code should not require itPer https://lab.civicrm.org/dev/core/-/issues/3685#note_83376
Note the issue is the FinancialType ACls require a financial type ID - it should be there BUT the financial type ID code should not require it5.55.2https://lab.civicrm.org/dev/core/-/issues/3977Payment processor handling of `billing-country-5` inconsistent2022-11-11T02:07:08ZeileenPayment processor handling of `billing-country-5` inconsistentThis is a follow on from https://lab.civicrm.org/dev/core/-/issues/3918 / https://github.com/civicrm/civicrm-core/pull/24232 / https://github.com/civicrm/civicrm-core/pull/24903
The original PR https://github.com/civicrm/civicrm-core/pu...This is a follow on from https://lab.civicrm.org/dev/core/-/issues/3918 / https://github.com/civicrm/civicrm-core/pull/24232 / https://github.com/civicrm/civicrm-core/pull/24903
The original PR https://github.com/civicrm/civicrm-core/pull/24903 did not explain what problem was being solved & it didn't come out in the review process.... so I think in the first instance we should establish that.
This is my best guess to reverse engineer the point of the original change ...
All calls to `doPayment` are expected to pass through the documented parameters https://docs.civicrm.org/dev/en/latest/extensions/payment-processors/create/#billing-fields - in this case the relevant parameter is `billing_country-5`. That parameter is a bit of a pig so some/ most code ALSO passes `country` - and this seems to be done consistently enough that `Paypal` and `Authorize.net` (our oldest processors) are using `country`.
I do think it is important that when payment processors are sending out an array the contract of what keys they should pass out is clear. If we want to deprecate `billing_country-5` in favour of 'country' that seems OK (we would need to update the docs) - but at the moment there seems to be some code that passes `country` in a format that is not correct - which led to the regression.
I feel like in the first instance we should find & fix (with tests) the reported instances of that that came up in https://lab.civicrm.org/dev/core/-/issues/3918
Looking at the code for `setBillingCountry` and the validation - I have a feeling that code may only be hit from the unit tests? In which case the case for reducing the validation seems strong enough.
One thing we COULD do in the test suite is register a hook on all unit tests for `alterPaymentProcessor` & validate the `country` field in it - that might track down any errant ones
I should note that `PropertyBag` isn't a subsitute for us fixing core code to pass the contract parameters5.56.0https://lab.civicrm.org/dev/core/-/issues/3974PHP8: fatal error when viewing event info page with OpenStreetMaps as mapping...2022-11-07T23:25:39ZJonGoldPHP8: fatal error when viewing event info page with OpenStreetMaps as mapping provider and a location with no geocode### Replication Steps
* On PHP 8.1, configure Civi with OpenStreetMaps as the Mapping Provider, but no (working) geocoding provider. On a civibuild site, setting *Geocoding Provider* to **Google** will do the trick.
* Edit an event to c...### Replication Steps
* On PHP 8.1, configure Civi with OpenStreetMaps as the Mapping Provider, but no (working) geocoding provider. On a civibuild site, setting *Geocoding Provider* to **Google** will do the trick.
* Edit an event to create a new address (which won't have a geocode since geocoding is disabled).
* Configure the event to show a map.
* Go to the Event Info page.
### Expected Result
No map, because no geocode.
### Actual Result
Fatal Error.
### Comments
This happens because of this line in `<civiroot>/templates/CRM/Contact/Form/Task/Map/OpenStreetMaps.tpl`:
```
{if count($locations) gt 1}
```
It expects `$locations` to always be set.
I imagine an alternative solution is to add an `isset()` to the template. I can do the other fix if preferred though.5.57.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3968unsupported operand types in BAO/Navigation.php, orderByWeight2022-11-07T10:27:07Zsebalisunsupported operand types in BAO/Navigation.php, orderByWeightHi,
when trying out if a Wordpress+Civi test instance would survive a PHP upgrade to 8.0, I found that the CiviCRM menu had gone missing. It turned out that a fatal PHP error occured in the AJAX call that retrieves the menu structure. I...Hi,
when trying out if a Wordpress+Civi test instance would survive a PHP upgrade to 8.0, I found that the CiviCRM menu had gone missing. It turned out that a fatal PHP error occured in the AJAX call that retrieves the menu structure. It originated in line 323 of CRM/Core/BAO/Navigation.php, which is in the orderByWeight function:
`return $a['attributes']['weight'] - $b['attributes']['weight'];`
Perhaps PHP 8 is treating such issues more seriously than 7 – sorry but I simply don’t know. In any case, I was able to overcome this by adding explicit type casts:
`return (int) $a['attributes']['weight'] - (int) $b['attributes']['weight'];`
This was complete guesswork and maybe I should have cast to float instead – again, I don’t know. But I thought this might be worth reporting so you can decide how to best safeguard that line. For now I am happy to have my menu back with this temporary and local patch.
By the way, this was observed in version 5.54.1 but I notice that the line is unchanged in the master, 5.55 and 5.56 branches.5.56.0https://lab.civicrm.org/dev/backdrop/-/issues/76The control buttons in crm pop ups are all X's2022-11-10T17:27:08ZalicefruminThe control buttons in crm pop ups are all X'sThe icons in crm-pop-up title bars in backdrop all display as X's see screenshot below:
![allexes](/uploads/f29652a34e9b7d1048ea33507031615c/allexes.png)
They should display as whatever font awesome icon is assigned to them usually so...The icons in crm-pop-up title bars in backdrop all display as X's see screenshot below:
![allexes](/uploads/f29652a34e9b7d1048ea33507031615c/allexes.png)
They should display as whatever font awesome icon is assigned to them usually something like print, minimize, maximize or close see screenshot below:
![rightIcons](/uploads/1de63b46ded997951c0a0b5e8f7e49b5/rightIcons.png)5.55.2https://lab.civicrm.org/dev/core/-/issues/3963Mix of auto renewing membership types and non-auto renewing membership types ...2024-03-15T21:08:28ZEdselopezMix of auto renewing membership types and non-auto renewing membership types not handled properly in pricesets.Overview
----------------------------------------
On a membership price set, it is possible to specify a mix of auto renewing memberships as well as non auto renewing memberships, but allow the selection of only one at a time (by virtue ...Overview
----------------------------------------
On a membership price set, it is possible to specify a mix of auto renewing memberships as well as non auto renewing memberships, but allow the selection of only one at a time (by virtue of it being a radio select). It seems CiviCRM doesn't know how to handle this properly, as it assumes that multiple options can be selected.
The code here https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/PriceSet.php#L1290 seems to fetch the HTML type (which should be the deciding factor on if the payment processor is compatible with handling multiple concurrent transactions) but doesn't really do anything with it.
Reproduction steps
----------------------------------------
1. Create a membership price set
2. Add a price field of type radio
3. Proceed to create selections having membership types selected, but be sure to include a mix of auto renewing membership types and non-auto renewing membership types
4. Add the price field on a contribution page and click save.
Current behaviour
----------------------------------------
(I have tested this for PayPal - Website Payments Standard, but it should be replicable for any payment processor which doesn't support "MultipleConcurrentPayments".
Error shown when trying to save
"Price Set
The membership price set associated with this online contribution allows a user to select BOTH an auto-renew AND a non-auto-renew membership. This requires submitting multiple processor transactions, and is not supported for one or more of the payment processors enabled under the Amounts tab."
Expected behaviour
----------------------------------------
The contribution form should recognize that the price field is a single select field, and therefore allow me to save the configuration.
Environment information
----------------------------------------
* __Browser:__ _Firefox 59.0.1/Chrome 78.0.3904/Safari 13_
* __CiviCRM:__ _Master/5.20.0/5.19.1/5.18.2/..._ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.0/7.1/7.2/7.3/...__
* __CMS:__ _Backdrop 1.5/Drupal 7.30/Joomla 3.3/WordPress 4.5/..._
* __Database:__ _MySQL 5.7.7/MariaDB 10.4/..._
* __Web Server:__ _Apache 2.4/Nginx 1.16/..._5.69.5seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/3962Bool token formatting2022-11-18T14:27:07ZeileenBool token formattingI hit an issue today where we were using tokens in smarty. We already have this format in several message templates - e.g
`{if '{contact.current_employer}'} ({contact.current_employer}){/if}`
The single quotes are necessary as `{if } ...I hit an issue today where we were using tokens in smarty. We already have this format in several message templates - e.g
`{if '{contact.current_employer}'} ({contact.current_employer}){/if}`
The single quotes are necessary as `{if } {/if} ` will fail - so it renders to `{if ''} {/if} `
However, the problem we hit is if the employer is `O'Malley Construction'` which renders as `{if 'O'Malley Construction'} {/if} `
I think the solution is to add a bool modifier & allow any token to be passed through it - it would also simplify the smarty a little - ie
`{if {contact.current_employer|bool}} ({contact.current_employer}){/if}`5.57.0