Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-11-23T07:22:03Zhttps://lab.civicrm.org/dev/core/-/issues/2021Contribution receipt has donor's name printed twice, once with non-printable ...2023-11-23T07:22:03ZBobSContribution receipt has donor's name printed twice, once with non-printable charactersOverview
----------------------------------------
Contribution receipts, notably those created with the Stripe extension, display the donor's information as follows:
```
Jane�Mary�Smith <$first . \x01 . $middle . \x01 . $last>
...Overview
----------------------------------------
Contribution receipts, notably those created with the Stripe extension, display the donor's information as follows:
```
Jane�Mary�Smith <$first . \x01 . $middle . \x01 . $last>
Jane Mary Smith <$first . \x20 . $middle . \x20 . $last>
123 Main St
...
```
The two \x01 characters (ASCII SOH, CRM_Core_DAO::VALUE_SEPARATOR) are displayed as boxes in some email clients, although they aren't displayable in this bug report.
The message template "Contributions - Receipt (on-line)" includes:
```
{if $billingName}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}<br />
{$email}
</td>
</tr>
{elseif $email}
```
For Stripe contributions, $billingName contains the first/middle/last names separated by SOH characters, as found in civicrm_address.name. The {if $billingName} block therefore gets printed, including both $billingName and the $address variable which contains the second instance of the donor's name, followed by their address.
The SOH characters in the first line of $address (the donor's name) are replaced with spaces in CRM_Core_BAO_Address::addDisplay().
Contributions via Paypal standard, in contrast, do not display the $billingName block as addresses created that way store NULL in civicrm_address.name.
Reproduction steps
----------------------------------------
1. Create a contribution with CiviCRM Stripe extension v. 6.4.2.
1. Observe the Billing Name and Address section of the emailed receipt.
Current behaviour
----------------------------------------
The donor's name is printed twice. Once with SOH separators, and again with spaces. If the middle name is blank, the second instance contains two spaces between first and last name.
Expected behaviour
----------------------------------------
The name should be printed once, with a single space between non-blank name components.
Additional comments
----------------------------------------
1. Perhaps the fix is to simply remove "$billingName\<br \/\>" from the template(s). Ideally, the double spaces in the case of a null middle name should be corrected also.
2. Event and Membership templates seem to have the same structure as the template shown above.
3. The Thank You page displays the donor's name as expected -- only once, with a single \x20 character between first and last name.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __CiviCRM:__ 5.28.2
* __CiviCRM Stripe extension__ v. 6.4.2
* __mjwshared extension__ v. 0.8.1
* __PHP:__ 7.3
* __CMS:__ Drupal 7.72https://lab.civicrm.org/dev/translation/-/issues/50Locale-aware recaptcha2020-12-14T04:07:55Zmattwiremjw@mjwconsult.co.ukLocale-aware recaptchaThe library in use by CiviCRM is a *very* old version and is not locale-aware. See https://civicrm.stackexchange.com/questions/11533/recaptcha-update-language/37503 for more info.
We should update the library and make recaptcha in CiviC...The library in use by CiviCRM is a *very* old version and is not locale-aware. See https://civicrm.stackexchange.com/questions/11533/recaptcha-update-language/37503 for more info.
We should update the library and make recaptcha in CiviCRM respect the locale of the form.https://lab.civicrm.org/dev/financial/-/issues/146alterPaymentProcessorParams hook and propertyBag2020-09-15T15:35:00Zmattwiremjw@mjwconsult.co.ukalterPaymentProcessorParams hook and propertyBagSee https://github.com/civicrm/civicrm-core/pull/17507#issuecomment-690213686:
> 1. pass property bag to alterPaymentProcessorParams
>
> - ✔ the hook gets to deal with sensible, known data and does not have to (re-)implement all t...See https://github.com/civicrm/civicrm-core/pull/17507#issuecomment-690213686:
> 1. pass property bag to alterPaymentProcessorParams
>
> - ✔ the hook gets to deal with sensible, known data and does not have to (re-)implement all the quirks of checking different array keys for one thing.
> - ✔ any setting the hook does in a prop bag ensures forward consistency for the next process in the chain (another hook or the main process)
> - ✖ It's possible that the reason for a hook is something pretty darn weird needs doing; in which case the raw array may be more useful.
>
> 2. pass the original array to the hook
>
> - ✖ hook has to do all work arounds
> - ✖ hook is free to implement bad practise in altering the array
> - ✔ hook can do whatever it likes.
>
> I think (1).
And example from Stripe where we're currently passing an array for compatibility (but this should not be used as a model as Stripe ignores the return values from the hook anyway).
https://lab.civicrm.org/extensions/stripe/-/blob/master/CRM/Core/Payment/Stripe.php#L484-489
// @fixme DO NOT SET ANYTHING ON $propertyBag or $params BELOW THIS LINE (we are reading from both)
$params = $this->getPropertyBagAsArray($propertyBag);
// We don't actually use this hook with Stripe, but useful to trigger so listeners can see raw params
$newParams = [];
CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $newParams);https://lab.civicrm.org/dev/financial/-/issues/145Adding "standard" params to propertyBag2020-09-16T00:42:12Zmattwiremjw@mjwconsult.co.ukAdding "standard" params to propertyBagThis came out of https://github.com/civicrm/civicrm-core/pull/18425 and https://github.com/civicrm/civicrm-core/pull/17595.
Specifically, adding "standard" parameters to propertyBag when they are already in use by a payment processor th...This came out of https://github.com/civicrm/civicrm-core/pull/18425 and https://github.com/civicrm/civicrm-core/pull/17595.
Specifically, adding "standard" parameters to propertyBag when they are already in use by a payment processor that has been converted to use propertyBag is likely to break existing implementations.
Accessing params that are later added as "standard" params to propertyBag when a payment processor is already converted internally to propertyBag (eg. most of the ones written by me Stripe, authnetecheck, Smartdebit).
Example Issues:
- authnetecheck accesses `$params['credit_card_number']` which disappears once mapped to a propertyBag because only the standardised `cardNumber` field is available.
- If authnetecheck was using `$propertyBag->getCustomProperty('credit_card_number')` it would throw an "InvalidArgumentException" because you are not allowed to use `getCustomProperty` for a "standard" property.
Similar issues will apply to any other properties that are already in use by a payment processor.
@eileen @artfulrobot @seamuslee @tottenhttps://lab.civicrm.org/dev/drupal/-/issues/140Improvement in member role sync to avoid unnecessary role remove and role rea...2020-09-15T18:42:04ZsadashivImprovement in member role sync to avoid unnecessary role remove and role reassignIf we turn on civicrm member role sync module and configure the membership to sync to a role then system removes the role and reassigns it when the sync function is invoked.
Steps to replicate:
1) Create a Membership type
2) Create a ro...If we turn on civicrm member role sync module and configure the membership to sync to a role then system removes the role and reassigns it when the sync function is invoked.
Steps to replicate:
1) Create a Membership type
2) Create a role in drupal
3) Enable civicrm_member_roles module
4) Configure the member role rule to add the new role on proper status of the membership
5) Configure the membership role to sync on user login or logout
6) Create a new membership for any user (note that the user now doesn't have the new role)
7) Login as the user (note that the user now has the role assigned)
8) Logout
If we see the code in the module it has a db_delete to delete the role assignment and then more code to reassign the role back, and these actions are performed on login or logout. This can be improved by not deleting the role and not saving the user again if there is no change required. This can be a improvement and will save few overhead on queries and on login/logout.
Thanks,
Sadashiv.https://lab.civicrm.org/dev/drupal/-/issues/139Drupal8: ckeditor, unable to upload images to event info2020-09-30T17:43:55ZAlanDixonDrupal8: ckeditor, unable to upload images to event infoSimilar to https://lab.civicrm.org/dev/drupal/-/issues/77
I can fix it the same way (add a .htaccess the undoes Drupal's inherited rewrite), but curious whether there's a nicer solution similar to 77's solution, or whether these ckedito...Similar to https://lab.civicrm.org/dev/drupal/-/issues/77
I can fix it the same way (add a .htaccess the undoes Drupal's inherited rewrite), but curious whether there's a nicer solution similar to 77's solution, or whether these ckeditor direct access issues should be addressed in a different way altogether?https://lab.civicrm.org/dev/financial/-/issues/144Figure out if core processors actually work.....2022-05-19T22:31:00ZeileenFigure out if core processors actually work.....The processors we currently ship with core are
| Processor | status|
| ------ | ------ |
| Authorize.net | works/tested |
| Elavon| broken? |
| Eway| works/tested/ converted to an extension |
| FirstData| broken? (Reported as working by...The processors we currently ship with core are
| Processor | status|
| ------ | ------ |
| Authorize.net | works/tested |
| Elavon| broken? |
| Eway| works/tested/ converted to an extension |
| FirstData| broken? (Reported as working by Brian Civi Version not mentioned) |
| PayflowPro| broken? (Reported as working as of 5.19 by Nicholas) (As of 5.38 Migrated to a core extension with unit tests) |
| PaymentExpress| definitely broken / removed|
| PayJunction| broken? |
| Paypal| works/tested |
| Realex| likely works, have seen gitlabs |
I think we should try to find out about the ones that might be broken with a view to either
1) bring them under CI & move to an extension (per Eway) OR
2) remove them from core
Other than pinging people like @lcdweb to see if they use any my other idea is to add a check or preUpgrade message to try to get people to let us know.
@seamusleehttps://lab.civicrm.org/dev/financial/-/issues/143Convert core processors to use Guzzle and bring them under CI2020-09-05T01:27:07ZeileenConvert core processors to use Guzzle and bring them under CISubtask of https://lab.civicrm.org/dev/financial/-/issues/132Subtask of https://lab.civicrm.org/dev/financial/-/issues/132https://lab.civicrm.org/dev/wordpress/-/issues/74IPN/webhook URLs should not be localized2020-09-04T10:33:07Zmattwiremjw@mjwconsult.co.ukIPN/webhook URLs should not be localizedOn a site with polylang enabled Stripe displays an error that the webhook path is not setup correctly because it returns the first, default locale URL.
Example: https://sitename.org/en/civicrm/payment/ipn/1/
But the non-localized https...On a site with polylang enabled Stripe displays an error that the webhook path is not setup correctly because it returns the first, default locale URL.
Example: https://sitename.org/en/civicrm/payment/ipn/1/
But the non-localized https://sitename.org/civicrm/payment/ipn/1/ also works as well as other locales.
Calls to `CRM_Utils_System::url()` generate a localized URL and there doesn't seem to be a way to ask for a specific locale (or default) - see https://lab.civicrm.org/extensions/mjwshared/-/blob/master/CRM/Mjwshared/WebhookTrait.php#L27
Not sure what the solution is here - @haystack @kcristiano - it causes Stripe to display errors about webhook configuration when it doesn't need to. Updating the webhook works too but is not actually necessary.https://lab.civicrm.org/dev/core/-/issues/1984Sometimes Custom fields missing on profile2023-06-05T20:22:11ZPradeep Nayakpradpnayak@gmail.comSometimes Custom fields missing on profileCustom fields are not rendered on profile front end pages like contribution or event pages. As soon as civi cache is cleared they start appearing.
```
Php - 7.3
opcahe disabled
Clean-up Temporary Data and Files schedule job executed hou...Custom fields are not rendered on profile front end pages like contribution or event pages. As soon as civi cache is cleared they start appearing.
```
Php - 7.3
opcahe disabled
Clean-up Temporary Data and Files schedule job executed hourly by cron job
```https://lab.civicrm.org/dev/financial/-/issues/142Order api proposal - require less line item parameters2020-12-03T10:37:27ZeileenOrder api proposal - require less line item parametersI'd like to propose that we add sensible defaults for line items when using the order api
1) price_field_id - if NONE of the rows have a price_field_id then use the default pricefield id for all of them (I don't want to open up technica...I'd like to propose that we add sensible defaults for line items when using the order api
1) price_field_id - if NONE of the rows have a price_field_id then use the default pricefield id for all of them (I don't want to open up technical analysis of dealing with multiple price sets, more complex config) - so this is just for that common use case
2) qty - if not set, default to 1
This would make the minimum required params for a 'quick config' (I hate that usage but I think we know what it means) order
```
$this->callAPISuccess('Order', 'create', [
'financial_type_id' => 'Donation',
'contact_id' => $contact1,
'line_items' => [
['line_item' => [
[
'financial_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'financial_type_id', 'Donation'),
'line_total' => 40,
],
[
'financial_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'financial_type_id', 'Member Dues'),
'line_total' => 50,
],
]],
]
]);
```
Ideally we would also accept
```
'financial_type_id' =>'Donation',
```https://lab.civicrm.org/dev/user-interface/-/issues/29Rewording of the "state" selector?2020-08-21T14:30:02ZsudomanRewording of the "state" selector?Some people not living in the US are confused or annoyed that it is required to select the "state" that they live in, since the listed options are municipalities in their country / state, and they might only recognized them as being near...Some people not living in the US are confused or annoyed that it is required to select the "state" that they live in, since the listed options are municipalities in their country / state, and they might only recognized them as being nearby cities. To them, the language seems American-centric.
One possible change could be:
````
- State/Province
+ State/Province/Region/Municipality
````
Thanks! : )https://lab.civicrm.org/dev/user-interface/-/issues/28Norway has changed the names of its counties2020-10-14T00:40:05ZsudomanNorway has changed the names of its countiesNorway recently updated the names of its counties, which Civi refers to as "states". Could you please update this list of counties? Thanks! : )
Norwegian government (Norwegian)
https://www.regjeringen.no/no/tema/kommuner-og-regioner/reg...Norway recently updated the names of its counties, which Civi refers to as "states". Could you please update this list of counties? Thanks! : )
Norwegian government (Norwegian)
https://www.regjeringen.no/no/tema/kommuner-og-regioner/regionreform/regionreform/nye-fylker/id2548426/
Wikipedia (English)
https://en.wikipedia.org/wiki/Counties_of_Norwayhttps://lab.civicrm.org/dev/drupal/-/issues/134[Drupal 8] civicrm-buildkit places assets in the wrong folder2020-08-21T21:35:52ZJonGold[Drupal 8] civicrm-buildkit places assets in the wrong folderOn a standard D8/Civi install, the CiviCRM assets are located in `<projectroot>/web/libraries/civicrm/`. On civicrm-buildkit, they're located in `<projectroot>/web/libraries/civicrm/core/` *except* for the `packages` folder, which is lo...On a standard D8/Civi install, the CiviCRM assets are located in `<projectroot>/web/libraries/civicrm/`. On civicrm-buildkit, they're located in `<projectroot>/web/libraries/civicrm/core/` *except* for the `packages` folder, which is located in `<projectroot>/web/libraries/civicrm/`. This causes a 404 error on any request to the contents of the `packages` folder, e.g. jQuery.https://lab.civicrm.org/dev/core/-/issues/1948Print Report from Manage Case shows relationships from client's other cases2023-07-03T18:38:08ZDaveDPrint Report from Manage Case shows relationships from client's other casesNot sure yet when it started.
1. Create two cases for a client with different case managers assigned.
2. Click on Print Report on Manage Case for either case.
3. It lists the case manager from the other case in the Client Relationships ...Not sure yet when it started.
1. Create two cases for a client with different case managers assigned.
2. Click on Print Report on Manage Case for either case.
3. It lists the case manager from the other case in the Client Relationships section.https://lab.civicrm.org/dev/core/-/issues/1926Finish allowing use of SSL to connect to database2023-07-24T03:44:31ZDaveDFinish allowing use of SSL to connect to databaseFollowing on to complete what's left for https://lab.civicrm.org/dev/core/-/issues/1137, there are a couple confusing things so I'm listing them to try to get a handle on them:
| thing | comment
| ---- | ----
| [CRM_Utils_File](https://...Following on to complete what's left for https://lab.civicrm.org/dev/core/-/issues/1137, there are a couple confusing things so I'm listing them to try to get a handle on them:
| thing | comment
| ---- | ----
| [CRM_Utils_File](https://github.com/civicrm/civicrm-core/blob/6eced9e6cedd66769757a30415a4c6c99fd0d231/CRM/Utils/File.php#L327) | This block seems to do almost the same thing as CRM_Core_DAO::init(), but not completely, but I think also has a "bug" where it wipes the sql_mode instead of updating it. This is called from e.g. the upgrade process, but it's not clear yet why that would require its own thing, since civi is already installed. Will test this out and see.
| [CRM_Utils_System::authenticate](https://github.com/civicrm/civicrm-core/blob/da6c68c61ab13ba434a5061701c3acfd8676cc29/CRM/Utils/System.php#L727) | It calls DB::connect assuming it's already available, and then does nothing with it, and then a couple milliseconds later the UF class does it again. Is this just leftover from refactoring, maybe as suggested in the comment a couple lines above. Additionally, only drupal 7 seems to use it, but it's not clear if it's really necessary and why can't it just use cms functions in the cms class, which it does in drupal 8 and the others.
| install/ | Would like to leave this out if the future plan is to move to a civicrm-setup variant. Otherwise it means adding fields to the form for example.https://lab.civicrm.org/dev/drupal/-/issues/130Use civicrm profile to simultaneously create civi contact and drupal user2020-09-01T19:18:58ZW01FUse civicrm profile to simultaneously create civi contact and drupal userI have set up a CiviCRM profile - ![ypf-profile](/uploads/e0b45d07d90d8fee422697b887f85fa9/ypf-profile.png) - in order to allow users to register with the site, and create both a CiviCRM contact and Drupal user account.
If from the prof...I have set up a CiviCRM profile - ![ypf-profile](/uploads/e0b45d07d90d8fee422697b887f85fa9/ypf-profile.png) - in order to allow users to register with the site, and create both a CiviCRM contact and Drupal user account.
If from the profiles page (/civicrm/admin/uf/group?reset=1) I click more > Use - Create Mode, it redirects to a screen that does not have the Drupal fields (username/password), and can successfully create a CiviCRM contact. But this is weird and happens even with setting "Account creation required" selected. I would expect this page to show and reflect the Drupal fields as well with that setting selected.
When visiting the same url (https://www.mysite.com/civicrm/profile/create?gid=14&reset=1) as an anonymous user, I correctly see the Drupal account fields AND the CiviCRM fields, but upon hitting save am shown an error:
> Profile Error Your profile is not saved and Account is not created.
Neither a Drupal account or CiviCRM contact are created.
There are also no new log messages at /admin/reports/dblog to indicate why it didn't work.https://lab.civicrm.org/dev/wordpress/-/issues/69Add support for Capability Manager2020-08-03T18:42:42ZAndrew WestAdd support for Capability ManagerAs mentioned in [#68](https://lab.civicrm.org/dev/wordpress/-/issues/68) we're a bit nervous of the WordPress Access Control page. instead we use [PublishPress Capabilities](https://wordpress.org/plugins/capability-manager-enhanced/), wh...As mentioned in [#68](https://lab.civicrm.org/dev/wordpress/-/issues/68) we're a bit nervous of the WordPress Access Control page. instead we use [PublishPress Capabilities](https://wordpress.org/plugins/capability-manager-enhanced/), which used to be Capability Manager (and something before that, I think). It's got about 90k installations. It shows all the WP capabilities for a given role, but one role at a time - so avoiding issues with max_input_vars.
By default the Civi capabilities are mixed in with 'Additional Capabilities', which makes it hard to tell them apart from capabilities added by other plugins:
![image](/uploads/d1651bd8856939ffbd3a50983423d5f2/image.png)
So we added a filter which separates it out:
![image](/uploads/619922931af42cee6d163375252f4be7/image.png)
It's a few lines:
```
function add_civicrm_category_to_capability_manager($capabilities) {
civicrm_initialize();
$permissions = array_keys(CRM_ACL_Form_WordPress_Permissions::getPermissionArray());
sort($permissions);
capabilities['CiviCRM'] = $permissions;
return capabilities;
}
add_filter('cme_plugin_capabilities','add_civicrm_category_to_capability_manager',10,1);
```
Is this too specific to add to Core?https://lab.civicrm.org/dev/wordpress/-/issues/68Add a warning to WordPress Access Control if max_input_vars is too low2020-08-13T00:11:07ZAndrew WestAdd a warning to WordPress Access Control if max_input_vars is too lowI haven't trusted the WordPress Access Control page since I saved a change and all hell broke loose with permissions. I think this was because max_input_vars was too low in our PHP settings. This had the effect of assigning spectacular a...I haven't trusted the WordPress Access Control page since I saved a change and all hell broke loose with permissions. I think this was because max_input_vars was too low in our PHP settings. This had the effect of assigning spectacular access to roles that shouldn't have had it.
We have 23 roles and 95 permissions, so there are in theory at least 2185 variables on the page. The default for max_input_vars is 1000. I'm not sure whether empty checkboxes are submitted as variables, though.
Is this worth warning people about? It's a security risk if you don't notice.
I've written a quick check for it. Does this seem sensible? I can submit a PR, but just wanted to run it past people here.
```
//check that we aren't above max_input_vars
$maxInputVars = ini_get('max_input_vars');
$varsOnThisPage = count($permissionsArray) * count($wp_roles->role_names);
if ($varsOnThisPage > $maxInputVars) {
CRM_Core_Session::setStatus("Submitting this page may have unexpected consequences for role permissions. " .
"You should increase the max_input_vars parameter in your PHP settings. " .
"There are $varsOnThisPage options on this page, but your max_input_parameter is $maxInputVars.", 'Warning', 'alert');
}
```
(I know this particular page is in Core rather than this plugin, but the WP repo seemed like a sensible place to ask)https://lab.civicrm.org/dev/drupal/-/issues/129When creating a D8 private file system e.g. /sites/default/private -> CiviCRM...2020-09-14T03:22:22ZKarinGWhen creating a D8 private file system e.g. /sites/default/private -> CiviCRM overrides location for templates_c specified in civicrm.settings.php fileIs this intentional? And is it necessary? I first saw this on my Pantheon test install and am now seeing it on one of Alan's hosted sites as well. Storing `templates_c` in the private file system [even though the `civicrm.settings.php` f...Is this intentional? And is it necessary? I first saw this on my Pantheon test install and am now seeing it on one of Alan's hosted sites as well. Storing `templates_c` in the private file system [even though the `civicrm.settings.php` file still has the non-public files location] results in a slow page load.
This only happens if you put your private files dir in `/sites/default/ `
On Alan's hosting we can move the private/files to the same level as `web/`
`[$settings['file_private_path'] = $app_root . '/../private/files';`
- so CiviCRM keeps using `/sites/default/files` for `templates_c` - but on Pantheon [and likely other hosting] you may not have access to create a dir at that level.
End result is that it creates the impression that CiviCRM on D8 is very slow.
@DaveD @seamuslee @jackrabbithanna @bgm - any ideas as to why/history/intentional?