CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2020-06-09T01:47:07Zhttps://lab.civicrm.org/dev/core/-/issues/1801[Activity] Default priority value whed add Activity2020-06-09T01:47:07Zmarcineq[Activity] Default priority value whed add ActivityOverview
----------------------------------------
I use a polish language CiviCRM. When i try create a activity - field "Priority" is empty. The default value doesn't insert into this field.
Reproduction steps
-------------------------...Overview
----------------------------------------
I use a polish language CiviCRM. When i try create a activity - field "Priority" is empty. The default value doesn't insert into this field.
Reproduction steps
----------------------------------------
0. Install CiviCRM with non-english language example polish.
1. Click on **Contacts -> Create activity**.
1. Field Priority is empty.
Current behaviour
----------------------------------------
![image](/uploads/cc5f1c8cd45ed12aaefc9ac819d083e4/image.png)
Priorities in polish:
![image](/uploads/eb91c0bb38a99fe9fd5ba191d06b1691/image.png)
Expected behaviour
----------------------------------------
Priority has selected "Normalny" (it's translated "Normal" value) as default.
Environment information
----------------------------------------
* __CiviCRM:__ _5.24.6 and any earlier version for at least 3 years_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.3/...__
* __CMS:__ _Drupal 7.70/_
* __Database:__ _MySQL 5.7.26-29_
Comments
----------------------------------------
I think I found the cause of the problem, but I don't have the skills to correct it. I'm just an ordinary consultant.
I found a line of code that is responsible for displaying this field in the add activity form. https://github.com/civicrm/civicrm-core/blob/a0f5cb5aff686458dc729ea0a43fbf166f9a8979/CRM/Activity/Form/Activity.php#L585
It shows search "Normal". However, I think that CiviCRM searches in the "Label" column in the database, not "Value" hence after changing the label - this field becomes empty by default.
When I replaced "Normal" on the test version with "Normal" (label in Polish) - the default option appeared correctly.
5.28.0https://lab.civicrm.org/dev/core/-/issues/1798Relative date filter - End of yesterday not working properly2020-06-08T15:18:49ZSandor SemseyRelative date filter - End of yesterday not working properlyOverview
----------------------------------------
Relative date filter `To end of yesterday` not working correctly: it's end date is today, not yesterday.
Reproduction steps
----------------------------------------
1. Click on **Contrib...Overview
----------------------------------------
Relative date filter `To end of yesterday` not working correctly: it's end date is today, not yesterday.
Reproduction steps
----------------------------------------
1. Click on **Contributions -> Find Contributions**.
1. Select **Date Receiced** -> *End of yesterday* then click **Search**.
1. Check date in search criteria
Current behaviour
----------------------------------------
End date is today midnight.
![Screenshot_from_2020-06-05_17-03-51](/uploads/e72d5a4b2e705ff6591c48b3ef3cccc3/Screenshot_from_2020-06-05_17-03-51.png)
Expected behaviour
----------------------------------------
End date is yesterday midnight.
Environment information
----------------------------------------
[CiviCRM Drupal Sandbox](https://dmaster.demo.civicrm.org)
Comments
----------------------------------------
I've checked the rest works well.
Proposed [Patch](https://github.com/civicrm/civicrm-core/pull/17512) is also supplied on GitHub5.28.0https://lab.civicrm.org/dev/core/-/issues/1797jquery validation type error on the credit card field2020-06-06T01:16:36Zalicefruminjquery validation type error on the credit card fieldOverview
----------------------------------------
On front end contribution forms with Credit Card Processing enabled, the [jQuery Validation Plugin](https://jqueryvalidation.org/creditcard-method/) is choking on the credit card field an...Overview
----------------------------------------
On front end contribution forms with Credit Card Processing enabled, the [jQuery Validation Plugin](https://jqueryvalidation.org/creditcard-method/) is choking on the credit card field and throwing the following error in the console: `TypeError: a.validator.methods[d] is undefined. Exception occurred when checking element credit_card_number, check the 'creditcard' method. jquery.validate.min.js:4:11231`
I think this broke when the jQuery Validation Plugin was updated with this [commit](https://github.com/civicrm/civicrm-core/pull/16625) in CiviCRM 5.25.
Reproduction steps
----------------------------------------
1. go to a front end contribution form with credit card processing set up
1. Enter a 1 into the credit card number field
Current behaviour
----------------------------------------
an error is thrown in the console.
NO validation error is thrown
SCREENSHOT FROM CiviCRM v5.25
![typeerror](/uploads/92a9c0bba3c9fd0f036e2178740f34b2/typeerror.png)
Expected behaviour
----------------------------------------
no error should appear in the console
an "Invalid credit card number" message should appear next to the field
SCREENSHOT FROM CiviCRM v5.24
![error](/uploads/310bda7df2cc96594ee8e53628537d3a/error.png)
Environment information
----------------------------------------
I was able to recreate this on http://wpmaster.demo.civicrm.org/ (CiviCRM v5.27) and (CiviCRM v5.25)5.26.1https://lab.civicrm.org/dev/core/-/issues/1795Using Parent tag in search form doesn't pull contacts marked with child tag i...2021-04-01T11:40:23ZMonish DebUsing Parent tag in search form doesn't pull contacts marked with child tag in search form resultReproduction steps
----------------------------------------
Steps to replicate:
1. Create a parent tag A and child tag A1
2. Create/update contact and tag with A1
3. Go to 'Find Contacts' or 'Find Contributions' and search by Tag - A
...Reproduction steps
----------------------------------------
Steps to replicate:
1. Create a parent tag A and child tag A1
2. Create/update contact and tag with A1
3. Go to 'Find Contacts' or 'Find Contributions' and search by Tag - A
Current behaviour
----------------------------------------
```
1. In 'Find Contact' result, it doesn't show contact which is tagged with child tag A1
2. In 'Find Contributions' result, it doesn't pull contribution(s) of contact tagged with child tag A1
```
Expected behaviour
----------------------------------------
Searching using a parent tag should automatically include the contacts which are in parent tag A and in its n child tag(s) - An. In this use-case it should show contact tagged with child A1 tag.
Comments
----------------------------------------
ping @JoeMurray @eileen @seamuslee @lcdweb5.29.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/1794Deselected checkbox settings are not saved2020-06-06T01:16:09Zaydunsaidan.saunders@squiffle.ukDeselected checkbox settings are not savedOverview
----------------------------------------
See https://civicrm.stackexchange.com/questions/35803/some-checkbox-settings-not-applying
Reproduction steps
----------------------------------------
1. Click on **Administer > Customize...Overview
----------------------------------------
See https://civicrm.stackexchange.com/questions/35803/some-checkbox-settings-not-applying
Reproduction steps
----------------------------------------
1. Click on **Administer > Customize Data and Screens > Custom Fields**.
1. Choose a custom field set, **more > Settings**
1. Choose one of the selected tickboxes and deselect.
1. Save
1. Re-open the settings page and observe that the checkbox is still selected
Current behaviour
----------------------------------------
Deselected value is not saved
Expected behaviour
----------------------------------------
Deselected value is saved
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
Confirmed on dmaster.demo.civicrm.org5.26.1https://lab.civicrm.org/dev/core/-/issues/1791E_WARNINGS when viewing list of pledge payments2020-05-31T22:32:29ZDaveDE_WARNINGS when viewing list of pledge payments1. Add a pledge for a contact. The details don't matter much, e.g. put in an amount and leave all the rest as defaults.
2. On the contact's pledges tab, right-click on the triangle to the left of the table that expands the pledge payment...1. Add a pledge for a contact. The details don't matter much, e.g. put in an amount and leave all the rest as defaults.
2. On the contact's pledges tab, right-click on the triangle to the left of the table that expands the pledge payment sequence and choose Open in New Tab.
3. Screen fills with E_WARNINGS.
4. You can also see it if you click the triangle normally and then check drupal watchdog.
The cause is some missing quotes here: https://github.com/civicrm/civicrm-core/blob/5.25.0/templates/CRM/Pledge/Page/Payment.tpl#L345.27.0https://lab.civicrm.org/dev/core/-/issues/1787Regression : File fields export results in DB error2021-03-22T20:15:23ZyashodhaRegression : File fields export results in DB errorIt was possible to export fields earlier
![export](/uploads/b55eb19f9b54375925777dcf3284a10d/export.png)
as the file field was exported as the link
But now it gives DB error as it looks like it is trying to put in content instead.
```
D...It was possible to export fields earlier
![export](/uploads/b55eb19f9b54375925777dcf3284a10d/export.png)
as the file field was exported as the link
But now it gives DB error as it looks like it is trying to put in content instead.
```
Database Error Code: Data too long for column 'custom_13' at row 1, 1406
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] =>
INSERT INTO civicrm_tmp_d_export_f8e0146418cb04e43d04334f268fd888 (`id`, `display_name`, `custom_13`, `participant_id`)
VALUES (1,'Mrs. Bernadette Ivanov',' <a href=\"/civicrm/file?reset=1&id=1&eid=42&fcs=66d344b164defb0da239223d1515c8a1b5e2305cd4be3c2527e18a2d6577acc4_1590738546_168\" class=\"crm-image-popup\" title=\"download.jpeg\">\n <i class=\"crm-i fa-file-image-o\" aria-hidden=\"true\"></i>\n </a>','42')
[nativecode=1406 ** Data too long for column 'custom_13' at row 1]
[type] => DB_Error
[user_info] =>
INSERT INTO civicrm_tmp_d_export_f8e0146418cb04e43d04334f268fd888 (`id`, `display_name`, `custom_13`, `participant_id`)
VALUES (1,'Mrs. Bernadette Ivanov',' <a href=\"/civicrm/file?reset=1&id=1&eid=42&fcs=66d344b164defb0da239223d1515c8a1b5e2305cd4be3c2527e18a2d6577acc4_1590738546_168\" class=\"crm-image-popup\" title=\"download.jpeg\">\n <i class=\"crm-i fa-file-image-o\" aria-hidden=\"true\"></i>\n </a>','42')
[nativecode=1406 ** Data too long for column 'custom_13' at row 1]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
INSERT INTO civicrm_tmp_d_export_f8e0146418cb04e43d04334f268fd888 (`id`, `display_name`, `custom_13`, `participant_id`)
VALUES (1,'Mrs. Bernadette Ivanov',' <a href=\"/civicrm/file?reset=1&id=1&eid=42&fcs=66d344b164defb0da239223d1515c8a1b5e2305cd4be3c2527e18a2d6577acc4_1590738546_168\" class=\"crm-image-popup\" title=\"download.jpeg\">\n <i class=\"crm-i fa-file-image-o\" aria-hidden=\"true\"></i>\n </a>','42')
[nativecode=1406 ** Data too long for column 'custom_13' at row 1]"]
)
```
I was able to replicate this on dmaster as well
![dmaster](/uploads/3c55e8ed9b1552c7bd0f79022d6bd930/dmaster.png)5.28.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1785CiviCRM's use of PEAR/Log causes Drupal 8.6+ and 9.* compatibility issues.2020-06-08T07:56:55ZhomotechsualCiviCRM's use of PEAR/Log causes Drupal 8.6+ and 9.* compatibility issues.Overview
----------------------------------------
_Currently CiviCRM Core requires the `pear/log` library. This library in turn requires `pear/pear_exception:1.0.0`. The library itself is unmaintained at present._
_Drupal 8/9 require `p...Overview
----------------------------------------
_Currently CiviCRM Core requires the `pear/log` library. This library in turn requires `pear/pear_exception:1.0.0`. The library itself is unmaintained at present._
_Drupal 8/9 require `pear/pear_exception:1.0.1`. This introduces an additional extra step for composer installs (that it would be nice to move away from!)_
Reproduction steps
----------------------------------------
1. Create a Drupal 8 (or 9) site: `composer create-project drupal/recommended-project d8site`
1. Attempt to install/require CiviCRM: `composer require civicrm/civicrm-core:'^5.25' civicrm/civicrm-packages:'^5.25' civicrm/civicrm-drupal-8:'^5.25' civicrm/civicrm-asset-plugin:'^1.0.0'`
1. You will receive a composer error regarding the inability to evaluate the correct version of `pear/pear_exception` to install.
Comments
----------------------------------------
_We could fix this by forking `pear/log` and bumping it's version requirement for `pear/pear_exception`. We could keep the current composer workaround (`composer require pear/pear_exception:'1.0.1 as 1.0.0'`). We could propose an upstream patch and hope that repo is, in fact, maintained despite appearances?_
_I'm planning to explore option 3 above by filing an issue against `pear/log` here: https://github.com/pear/Log_5.27.0https://lab.civicrm.org/dev/core/-/issues/1784Contact restore from trash not working2020-06-01T00:07:09ZDaveDContact restore from trash not workingSee also https://civicrm.stackexchange.com/questions/35766/restore-from-trash-not-working-no-related-log-entries
Seems to be from here: https://github.com/civicrm/civicrm-core/commit/8e12bf072fe613c29da39614c8999a4041d7e1d2
In contactT...See also https://civicrm.stackexchange.com/questions/35766/restore-from-trash-not-working-no-related-log-entries
Seems to be from here: https://github.com/civicrm/civicrm-core/commit/8e12bf072fe613c29da39614c8999a4041d7e1d2
In contactTrashRestore() it used to fall through to the code below which does the save(). Then by just copying that block to deleteContact() and calling self::create() it doesn't work because it's expecting `contact_id` not `id`.
So would have started in 5.25.
The quick fix would be to use contact_id. But it sounds like there's a desire to deprecate this entire path of calling deleteContact in order to restore.5.26.0https://lab.civicrm.org/dev/core/-/issues/1780Export selected fields doesn't export related contacts if related info is pre...2020-06-04T04:12:51ZyashodhaExport selected fields doesn't export related contacts if related info is present in mappingSteps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields fo...Steps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields for Export* with some fields as related fields like employer, spouse of id etc
* *DO NOT MERGE*
* Export > only X-N contact records where N is the contacts that appeared in related contacts fields
I replicated this on dmaster and seems to be a regression when compared it with 4.7 site where no. of contacts exported was X regardless related fields are used in mapping or primary fields are used.5.26.0https://lab.civicrm.org/dev/core/-/issues/1773Unsubscribe generates 500 server error responses, logs say "missing parameters"2020-05-27T06:19:28ZRichUnsubscribe generates 500 server error responses, logs say "missing parameters"Overview
----------------------------------------
Same as reported at:
https://civicrm.stackexchange.com/questions/35323/missing-parameters-error-in-unsubscribe-confirmation
There was a PR
https://github.com/civicrm/civicrm-core/pull/1...Overview
----------------------------------------
Same as reported at:
https://civicrm.stackexchange.com/questions/35323/missing-parameters-error-in-unsubscribe-confirmation
There was a PR
https://github.com/civicrm/civicrm-core/pull/17081
to fix this but I'm still seeing these errors after applying the patch to Unsubscribe.php
I find it is intermittent: Every time *I* have used the form, it works! I've tried it on a desktop browser and Chrome on Android, for the same records as those that caused the crashes. I've tried it from a not-logged-in browser (i.e. anonymously) using the exact same link used by the people it crashed for and it "worked for me".
Environment information
----------------------------------------
* __Browser:__ Have seen errors on Chrome on iOS and Chrome on Android
* __CiviCRM:__ 5.24.5
* __PHP:__ _7.0
* __CMS:__ Drupal 7.70
* __Database:__ MariaDB 10.1
* __Web Server:__ nginx
Some more logs
---------------
Here's an example.
Error:
```
[1] => Array
(
[message] => Missing Parameters
[code] =>
[exception] => CRM_Core_Exception Object
(
[errorData:CRM_Core_Exception:private] => Array
(
[error_code] => 0
)
[cause:protected] =>
[_trace:PEAR_Exception:private] =>
[message:protected] => Missing Parameters
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/mysite.com/sites/all/modules/civicrm/CRM/Mailing/Form/Unsubscribe.php
[line:protected] => 31
```
POST was:
```
qfKey: 1f83e143301245d6f4a5839b3e49330e_7836
entryURL: https://mandrillapp.com/track/click/30767716/a-long-string
_qf_default: Unsubscribe:next
email_confirm: the-correct-email-address@example.com
_qf_Unsubscribe_next:Unsubscribe
```
5.27.0https://lab.civicrm.org/dev/core/-/issues/1769Usage can be changed for reserved rule2023-03-16T16:23:08ZyashodhaUsage can be changed for reserved ruleReserved rule does NOT mean anything. Make *Usage* field read only.
Steps to replicate :
---------------------
* Go to *Find and Merge Duplicate Contacts*
* Edit *Usage* for *Supervised* rule to *General*
* It will result on ugly error...Reserved rule does NOT mean anything. Make *Usage* field read only.
Steps to replicate :
---------------------
* Go to *Find and Merge Duplicate Contacts*
* Edit *Usage* for *Supervised* rule to *General*
* It will result on ugly error on Contact save!
![fjmc_before](/uploads/fc462aba515cd510062cc61427f77c6f/fjmc_before.png)5.49.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1767CRM_Dedupe_Finder parses phone key incorrectly2020-07-19T21:43:43Zwil_SRQCRM_Dedupe_Finder parses phone key incorrectlyOverview
----------------------------------------
A profile input form that matches on Phone-Main-Mobile (and I suspect on any phone) sends CRM_Dedupe_Finder::formatParams an input like '["phone-3-1"] => "3214567890"' which after the rel...Overview
----------------------------------------
A profile input form that matches on Phone-Main-Mobile (and I suspect on any phone) sends CRM_Dedupe_Finder::formatParams an input like '["phone-3-1"] => "3214567890"' which after the relevant code around line 255 yields ["phone-3"]. This doesn't match the "phone" in CRM_Dedupe_BAO_RuleGroup::supportedFields so the duplicate check fails.
I patched this by replacing the regular expression in line 255
https://github.com/civicrm/civicrm-core/blob/master/CRM/Dedupe/Finder.php#L255
- **From:** `'/(.*)-(Primary-[\d+])$|(.*)-(\d+|Primary)$/'`
- **To:** `'/(.*)-(Primary-[\d+])$|(.*)-(\d+-\d+)$|(.*)-(\d+|Primary)$/'`
https://civicrm.stackexchange.com/q/35672/5446
Reproduction steps
----------------------------------------
1. Create individual unsupervised rule that matches on phone
2. Create input profile that creates contact with phone-main-mobile and set to "Update the matching contact" on duplicate match
3. Create multiple contacts with same phone
Current behaviour
----------------------------------------
Creates duplicate contacts
Expected behaviour
----------------------------------------
Update pre-existing contact
Environment information
----------------------------------------
* __CiviCRM:__ 5.25.0
Comments
----------------------------------------
I expect you'd prefer I do what's called a "pull request." Apologies, I'm an old retired guy who hasn't programmed for a living in over 35 years so all this new fangled stuff intimidates me. This was an act of desperation on behalf of the nonprofit I volunteer for.
@jaapjansma has created the PR: https://github.com/civicrm/civicrm-core/pull/173615.29.0https://lab.civicrm.org/dev/core/-/issues/1766[Test framework] Flaky xx.getFromTo tests2020-05-19T03:02:43ZDaveD[Test framework] Flaky xx.getFromTo testsI think I know what the problem is. Will take a closer look tomorrow. Basically a dataprovider can't have dynamic stuff in it that depends on time (or not relevant here but it also can't depend on anything in setUp()), because dataprovid...I think I know what the problem is. Will take a closer look tomorrow. Basically a dataprovider can't have dynamic stuff in it that depends on time (or not relevant here but it also can't depend on anything in setUp()), because dataproviders run even before setUpBeforeClass(). Instead in the dataprovider one of the passed values could be a closure and then call the closure from the test, or don't use a dataprovider.
ping @seamuslee @totten
e.g. https://test.civicrm.org/job/CiviCRM-Core-PR/34046/testReport/junit/(root)/CRM_Report_FormTest/testGetFromTo_with_data_set__2/
```
CRM_Report_FormTest::testGetFromTo with data set #2 ('20200514000000', '20200514235959', 'previous.day', '', '')
fail on data set [ previous.day , , ]. Local php time is 2020-05-16 00:19:45 and mysql time is 2020-05-16 00:19:45
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 0 => '20200514000000'
- 1 => '20200514235959'
+ 0 => '20200515000000'
+ 1 => '20200515235959'
/home/jenkins/bknix-dfl/build/core-17335-1ycjc/web/sites/all/modules/civicrm/tests/phpunit/CRM/Report/FormTest.php:74
/home/jenkins/bknix-dfl/build/core-17335-1ycjc/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:222
/home/jenkins/bknix-dfl/civicrm-buildkit/extern/phpunit6/phpunit6.phar:570
```
5.27.0https://lab.civicrm.org/dev/core/-/issues/1762Don't log subscription_history table2020-05-18T07:51:38ZJKingsnorthDon't log subscription_history tableProblem: If detailed logging is enabled, a lob table for civicrm_subscription_history is created. But that table *is* a log itself. Which stores changes to group membership as new rows.
I cannot see any benefit in logging a logging tabl...Problem: If detailed logging is enabled, a lob table for civicrm_subscription_history is created. But that table *is* a log itself. Which stores changes to group membership as new rows.
I cannot see any benefit in logging a logging table.
Solution:
Suggest that we disable logging of this table by default for new installations, and new instances of logging being enabled.
We could also put a warning message in the update script that this will be disabled by default.
If anyone wants to preserve logging on this table, they could add it back in using hook_civicrm_alterLogTables5.27.0https://lab.civicrm.org/dev/core/-/issues/1760SMTP page appears broken when language is French (JS issue)2020-05-20T12:34:55ZVangelisPSMTP page appears broken when language is French (JS issue)On the SMTP settings admin page, there's a warning when you switch from Redirect to database to a live mode. In French language, the translation has double-quotes, but js-escaping does single quotes and expects the terminator to be singl...On the SMTP settings admin page, there's a warning when you switch from Redirect to database to a live mode. In French language, the translation has double-quotes, but js-escaping does single quotes and expects the terminator to be single quotes.
To reproduce, switch language to french and visit the admin smtp settings page. Look in the browser javascript console and you'll see the error.
The issue is located [here](https://github.com/civicrm/civicrm-core/blob/5.25.0/templates/CRM/Admin/Form/Setting/Smtp.tpl#L96)
@DaveD was kind enough and quick enough to produce a PR for this: https://github.com/civicrm/civicrm-core/pull/17315 so all credit goes to him.5.27.0https://lab.civicrm.org/dev/core/-/issues/1758Record Payment does not update check_number & trxn id on main contribution.2020-09-09T05:47:08ZjitendraRecord Payment does not update check_number & trxn id on main contribution.To reproduce -
- Create a pending contribution.
- Record payment and enter C111 in the check number field.
- Main contribution row in civicrm_contribution table is not updated with the check number field. This leads to empty values in c...To reproduce -
- Create a pending contribution.
- Record payment and enter C111 in the check number field.
- Main contribution row in civicrm_contribution table is not updated with the check number field. This leads to empty values in contribution export.
Similar issues with trxn_id input field.
Note that the main contribution values are updated if we use the payment edit form.
Related issue was raised at https://lab.civicrm.org/dev/core/-/issues/1483 but it deals specifically with the incorrect updates made via the edit form. Also that tickets needs concept approval as one of the unit test asserts this wrong behaviour(more info on [gitlab](https://lab.civicrm.org/dev/core/-/issues/1483))5.27.0https://lab.civicrm.org/dev/core/-/issues/1755Mailing Subscription form does not validate reCaptcha2020-07-28T23:07:08ZbgmMailing Subscription form does not validate reCaptchaTo reproduce:
* Go to: https://civicrm.org/civicrm/mailing/subscribe?reset=1 (or setup any site with a reCaptcha key, it automatically enables on this form).
* Enter an email, select a newsletter
* Hit Submit, without answering the Capt...To reproduce:
* Go to: https://civicrm.org/civicrm/mailing/subscribe?reset=1 (or setup any site with a reCaptcha key, it automatically enables on this form).
* Enter an email, select a newsletter
* Hit Submit, without answering the Captcha.
Result: captcha is not validated.
I tried debugging to the point where in `CRM_Core_Utils_ReCAPTCHA::add()`, the call to `isSubmitted` returns false, but that may have been a misleading, since removing this bit seems to fix it:
https://lab.civicrm.org/dev/core/-/blob/master/CRM/Mailing/Form/Subscribe.php#L123
```
// If this is POST request and came from a block,
// lets add recaptcha only if already present.
// Gross hack for now.
if (!empty($_POST) &&
!array_key_exists('recaptcha_challenge_field', $_POST)
) {
$addCaptcha = FALSE;
}
```
I don't know what "came from a block" means in this context. Mayeb an old Drupal block?
It was added in 2009: https://github.com/civicrm/civicrm-svn/commit/e745abc5114e644ef58712a42e73af9be100588c#diff-7e49ca39c25024fb4dbba97bee79be03
Related: infra/ops#9465.29.0https://lab.civicrm.org/dev/core/-/issues/1753Deleting an activity with attachments doesn't delete the file or entries in c...2020-06-02T06:07:11ZDaveDDeleting an activity with attachments doesn't delete the file or entries in civicrm_file/civicrm_entity_fileThis might be an old issue but I did a quick look and didn't see anything. If a file is shared between two entities, then I could understand if it leaves civicrm_file and the file itself and just removes civicrm_entity_file, but it doesn...This might be an old issue but I did a quick look and didn't see anything. If a file is shared between two entities, then I could understand if it leaves civicrm_file and the file itself and just removes civicrm_entity_file, but it doesn't seem to remove anything, and even when there's no sharing (i.e. zero reference count).
1. Create e.g. an email activity. Add an attachment.
2. Delete the activity, e.g. from your contact's activity tab.
3. Look in sites/default/files/civicrm/custom. The attachment file is still there.
4. Also the entries are still there in civicrm_file and civicrm_entity_file even though the entry in civicrm_activity isn't there anymore.5.27.0https://lab.civicrm.org/dev/core/-/issues/1751Email template permissions2020-07-18T03:07:08Zfran@compucorp.co.ukEmail template permissionsOverview
----------------------------------------
In the email modal, CiviCRM users can write an email from scratch or use an existing message template. They are given the options to update existing templates or save a new template.
Th...Overview
----------------------------------------
In the email modal, CiviCRM users can write an email from scratch or use an existing message template. They are given the options to update existing templates or save a new template.
These options are currently available and can be completed by users with basic access to CiviCRM*, even when they do not have the permission CiviCRM: edit message templates.
Organisations want to create standard message templates that cannot be altered by the hundreds of staff using the templates. They need to be able to set this up as a user permission.
Current behaviour
----------------------------------------
When writing an email in the email modal, CiviCRM users can write an email from scratch or use an existing template. If they write an email from scratch they have the option to save their email as a new message template. If they use an existing template, they have an option to ‘update’ the template or save it as a new message template.
When a CiviCRM user writes an email, selects ‘Save as new template’ and sends the email, a new message template is created. These steps are the same when a user edits an already existing email template.
When a CiviCRM user selects an existing email template, makes changes to the content, selects ‘Update template’ and sends the email, the existing template is updated to whatever content the user has changed.
![permissions_template](/uploads/67b28e3e11d4cf353e1845b22c3fac31/permissions_template.png)
Email templates can be accessed where the email modal is triggered (e.g. contact record, cases extension etc.).
Expected behaviour
----------------------------------------
Acceptance criteria:
Any user that does not have the permission to update email templates [CiviCRM: edit message templates] should not see the check box ‘Update Template’
Any user that does not have the permission to create email templates [CiviCRM: edit message templates] should not be able to edit the content of email templates
![permissions_update_template](/uploads/719e1502f187a21a52027b946cd51e92/permissions_update_template.png)5.29.0