CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2020-08-12T12:19:57Zhttps://lab.civicrm.org/dev/core/-/issues/571Can't self-service cancel a recurring contribution made while you're logged in2020-08-12T12:19:57ZJonGoldCan't self-service cancel a recurring contribution made while you're logged inThe self-service recurring payment page is accessible either a) with a checksum, b) if you have "Edit contributions" permission ([code here](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/CancelSubscription.php#L...The self-service recurring payment page is accessible either a) with a checksum, b) if you have "Edit contributions" permission ([code here](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/CancelSubscription.php#L108-L115)).
However, if you're logged in when you create a recurring contribution, the email you receive doesn't contain a checksum ([code here](https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L1516)). So users without "Edit contributions" permission can't cancel their subscriptions.
I think the implication of allowing a user to cancel their payment via checksum is that we should also allow a user to cancel if the logged-in contact ID matches the contact ID of the recurring contribution. This would also mean on systems where users are logged in, you would have the added benefit of not worrying about expired checksums.
Is there any scenario in which we shouldn't allow a user to cancel a recurring subscription they "own"? If not I'll submit a PR.5.13.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/433Queries combining multiple text labels using REGEXP do not escape regular exp...2019-12-15T05:25:58ZAgilewareQueries combining multiple text labels using REGEXP do not escape regular expression metacharactersMost obvious example of this is the "Fee Level" options for events.
We have a site that had set their price set option like:
Price set option name - $120 (GST incl)
This fails during search, either because of the characters after the ...Most obvious example of this is the "Fee Level" options for events.
We have a site that had set their price set option like:
Price set option name - $120 (GST incl)
This fails during search, either because of the characters after the $ end-of-string match, or because (GST incl) is interpreted as a sub-expression rather than matching the parentheses when it's selected as a fee level to search for.
Currently we're working on a solution using preg_quote.
Agileware Ref: CIVICRM-9905.13.0https://lab.civicrm.org/dev/core/-/issues/502DB error "no such field" when executing actions on a sorted contact search re...2019-08-23T07:53:16ZjensschuppeDB error "no such field" when executing actions on a sorted contact search result with search profileSteps to reproduce:
- Create a profile with e.g. the postal code field of the primary address
- Perform a contact search using this profile for displaying the results
- Sort the result by the postal code field
- Tick the "all # records"...Steps to reproduce:
- Create a profile with e.g. the postal code field of the primary address
- Perform a contact search using this profile for displaying the results
- Sort the result by the postal code field
- Tick the "all # records" radio button
- Choose any action to perform on the result (e.g. "Print PDF document")
The result is a "DB error: no such field" for the "1-postal_code" field. Error details:
```
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT contact_a.id as contact_id FROM civicrm_contact contact_a WHERE (contact_a.is_deleted = 0) ORDER BY `1-postal_code` asc, `contact_a`.`id` [nativecode=1054 ** Unknown column '1-postal_code' in 'order clause']
[type] => DB_Error
[user_info] => SELECT contact_a.id as contact_id FROM civicrm_contact contact_a WHERE (contact_a.is_deleted = 0) ORDER BY `1-postal_code` asc, `contact_a`.`id` [nativecode=1054 ** Unknown column '1-postal_code' in 'order clause']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id FROM civicrm_contact contact_a WHERE (contact_a.is_deleted = 0) ORDER BY `1-postal_code` asc, `contact_a`.`id` [nativecode=1054 ** Unknown column '1-postal_code' in 'order clause']"]
)
```
The generated query is missing the JOINs for the `civicrm_address` table, resulting in the postal_code field not being part of the result set to be ordered by. The JOIN is not being added to the query in `CRM_Contact_BAO_Query::prepareOrderBy()` due to the field being named `1-postal_code` and the code expects the field being named `postal_code` for adding relationships to the `civicrm_address` table.
The exception is being raised in [`CRM_Contact_BAO_Query::searchQuery`](https://lab.civicrm.org/dev/core/blob/master/CRM/Contact/BAO/Query.php#L4958).
Stepping through the code, this seems to also happen when ordering the search result, but the exception is then being caught in [`CRM_Contact_Selector::fillupPrevNextCache()`](https://lab.civicrm.org/dev/core/blob/master/CRM/Contact/Selector.php#L1048), following a `$this->rebuildPreNextCache()` call to re-create the query.5.13.0https://lab.civicrm.org/dev/core/-/issues/726Advanced Search: There is an Internal Server Error (500) when the user tries ...2019-06-15T15:19:40ZPradeep Nayakpradpnayak@gmail.comAdvanced Search: There is an Internal Server Error (500) when the user tries to search by the "Mailing List" group type* Click "View contact record"
* Click "Search" -> "Advanced Search"
* Click "search by group type"
* Choose the "Mailing List" option
* Click "Search"
Actual result: There is an Internal Server Error (500).
Expected result: There is a ...* Click "View contact record"
* Click "Search" -> "Advanced Search"
* Click "search by group type"
* Choose the "Mailing List" option
* Click "Search"
Actual result: There is an Internal Server Error (500).
Expected result: There is a warning message "No matches found for: Group Type(s) Mailing List"5.13.0https://lab.civicrm.org/dev/core/-/issues/904PR 13333 breaks the Save and New button on a new case2019-05-07T23:05:09ZDaveDPR 13333 breaks the Save and New button on a new caseIf I take out the second "submitOnce" line in CRM/Case/Form/Activity/OpenCase.php then it works again.If I take out the second "submitOnce" line in CRM/Case/Form/Activity/OpenCase.php then it works again.5.13.0https://lab.civicrm.org/dev/core/-/issues/907[php 7.2 support] deprecation notice in cli.clas2019-04-30T09:24:54Zeileen[php 7.2 support] deprecation notice in cli.clasThis won't cause any issues but gives a deprecation notice & needs fixing
PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in
/home/kaiva276/menscommission.in/wp-content/plugins/civi...This won't cause any issues but gives a deprecation notice & needs fixing
PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in
/home/kaiva276/menscommission.in/wp-content/plugins/civicrm/civicrm/bin/cli.class.php
(row appears to have changed as that is 5.10)
https://github.com/civicrm/civicrm-core/blob/62bf1e4237e6332b29aace76c1c5fbaf8a52bdff/bin/cli.class.php#L1495.13.0https://lab.civicrm.org/dev/core/-/issues/536Contribution tab is slow to render for contacts with many contributions (in l...2019-04-26T23:08:59ZeileenContribution tab is slow to render for contacts with many contributions (in large database)We are finding that the contribution tab is extremely slow to render on contacts with a large number of contributions. While we are taking at a different scale db to most instances (many millions of contacts and the very slow to load con...We are finding that the contribution tab is extremely slow to render on contacts with a large number of contributions. While we are taking at a different scale db to most instances (many millions of contacts and the very slow to load contacts have > 10,000 donation) from my digging the issues that cause the slowness are not limited to us and the query improvements that work for us are generally applicable.
We are seeing maybe 10 queries that take about 6 seconds each. In each case it is possible to reduce the query to around 0.05 seconds with an index hint. The issue is exacerbated by the fact that several of the slower queries run twice each.
I've pasted all the queries below
1.
SELECT COUNT(*) as count,
SUM(total_amount) as amount,
AVG(total_amount) as average,
currency
FROM civicrm_contribution b
LEFT JOIN civicrm_line_item i ON i.contribution_id = b.id AND i.entity_table = 'civicrm_contribution' AND i.financial_type_id NOT IN (3,1,4,2)
WHERE b.contact_id IN (76) AND b.contribution_status_id = 1 AND b.is_test = 0 AND b.receive_date >= 20180101 AND b.receive_date < 20190101
GROUP BY currency;
2.
------------------------------
SELECT count( DISTINCT civicrm_contribution.id ) as rowCount
FROM civicrm_contact contact_a
LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' )
AND (contact_a.is_deleted = 0) ;
3.
------------------------------------
SELECT COUNT( conts.total_amount ) as total_count,
SUM( conts.total_amount ) as total_amount,
AVG( conts.total_amount ) as total_avg,
conts.currency as currency FROM (
SELECT civicrm_contribution.total_amount, COUNT(civicrm_contribution.total_amount) as civicrm_contribution_total_amount_count,
civicrm_contribution.currency FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 GROUP BY civicrm_contribution.id
) as conts
GROUP BY currency;
4.
------------------------------------
SELECT COUNT( conts.total_amount ) as total_count,
SUM( conts.total_amount ) as total_amount,
AVG( conts.total_amount ) as total_avg,
conts.currency as currency, SUBSTRING_INDEX(GROUP_CONCAT(conts.total_amount
ORDER BY conts.civicrm_contribution_total_amount_count DESC SEPARATOR ';'), ';', 1) as amount,
MAX(conts.civicrm_contribution_total_amount_count) as civicrm_contribution_total_amount_count
FROM (SELECT civicrm_contribution.total_amount, COUNT(civicrm_contribution.total_amount) as civicrm_contribution_total_amount_count,
civicrm_contribution.currency
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1
GROUP BY currency, civicrm_contribution.total_amount ORDER BY civicrm_contribution_total_amount_count DESC) as conts
GROUP BY currency;
5.
---------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a
LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id
WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0)
AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'AUD';
6.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a
LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id
WHERE ( contact_a.id = '76' )
AND (contact_a.is_deleted = 0)
AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1
AND civicrm_contribution.currency = 'AUD'
ORDER BY median LIMIT 0,1;
7.
------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'NZD';
8.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'NZD'
ORDER BY median LIMIT 0,1;
9.
------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'USD';
10.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'USD'
ORDER BY median LIMIT 0,2;
11.
------------------------------------
SELECT COUNT( conts.total_amount ) as cancel_count,
SUM( conts.total_amount ) as cancel_amount,
AVG( conts.total_amount ) as cancel_avg,
conts.currency as currency FROM (
SELECT civicrm_contribution.total_amount, civicrm_contribution.currency FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.cancel_date IS NOT NULL
GROUP BY civicrm_contribution.id
) as conts
GROUP BY currency;
12.
------------------------------------
SELECT COUNT( conts.total_amount ) as total_count,
SUM( conts.total_amount ) as total_amount,
AVG( conts.total_amount ) as total_avg,
conts.currency as currency FROM (
SELECT civicrm_contribution.total_amount, COUNT(civicrm_contribution.total_amount) as civicrm_contribution_total_amount_count,
civicrm_contribution.currency FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 GROUP BY civicrm_contribution.id
) as conts
GROUP BY currency;
13.
------------------------------------
SELECT COUNT( conts.total_amount ) as total_count,
SUM( conts.total_amount ) as total_amount,
AVG( conts.total_amount ) as total_avg,
conts.currency as currency, SUBSTRING_INDEX(GROUP_CONCAT(conts.total_amount
ORDER BY conts.civicrm_contribution_total_amount_count DESC SEPARATOR ';'), ';', 1) as amount,
MAX(conts.civicrm_contribution_total_amount_count) as civicrm_contribution_total_amount_count
FROM (SELECT civicrm_contribution.total_amount, COUNT(civicrm_contribution.total_amount) as civicrm_contribution_total_amount_count,
civicrm_contribution.currency FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1
GROUP BY currency, civicrm_contribution.total_amount ORDER BY civicrm_contribution_total_amount_count DESC) as conts
GROUP BY currency;
14.
------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'AUD';
15.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'AUD'
ORDER BY median LIMIT 0,1;
16.
------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'NZD';
17.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'NZD'
ORDER BY median LIMIT 0,1;
18.
------------------------------------
SELECT count(*) as count FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'USD';
19.
------------------------------------
SELECT civicrm_contribution.total_amount as median
FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.contribution_status_id = 1 AND civicrm_contribution.currency = 'USD'
ORDER BY median LIMIT 0,2;
20.
------------------------------------
SELECT COUNT( conts.total_amount ) as cancel_count,
SUM( conts.total_amount ) as cancel_amount,
AVG( conts.total_amount ) as cancel_avg,
conts.currency as currency FROM (
SELECT civicrm_contribution.total_amount, civicrm_contribution.currency FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( contact_a.id = '76' ) AND (contact_a.is_deleted = 0) AND (contact_a.is_deleted = 0) AND civicrm_contribution.cancel_date IS NOT NULL
GROUP BY civicrm_contribution.id
) as conts
GROUP BY currency;
21.
------------------------------------
SELECT a.id as `id`, a.contact_id as `contact_id`, a.amount as `amount`, a.currency as `currency`, a.frequency_unit as `frequency_unit`, a.frequency_interval as `frequency_interval`, a.installments as `installments`, a.start_date as `start_date`, a.create_date as `create_date`, a.modified_date as `modified_date`, a.cancel_date as `cancel_date`, a.end_date as `end_date`, a.processor_id as `processor_id`, a.payment_token_id as `payment_token_id`, a.trxn_id as `trxn_id`, a.invoice_id as `invoice_id`, a.contribution_status_id as `contribution_status_id`, a.is_test as `is_test`, a.cycle_day as `cycle_day`, a.next_sched_contribution_date as `next_sched_contribution_date`, a.failure_count as `failure_count`, a.failure_retry_date as `failure_retry_date`, a.auto_renew as `auto_renew`, a.payment_processor_id as `payment_processor_id`, a.financial_type_id as `financial_type_id`, a.payment_instrument_id as `payment_instrument_id`, a.campaign_id as `campaign_id`, a.is_email_receipt as `is_email_receipt`
FROM civicrm_contribution_recur a
WHERE (a.contact_id = "76") AND (a.contribution_status_id IN ("3", "10", "7", "1"))
ORDER BY a.is_test, a.start_date DESC;
22.
------------------------------------
SELECT SQL_CALC_FOUND_ROWS ccs.id, ccs.amount as amount,
ccs.contribution_id,
ccs.pcp_id,
ccs.pcp_display_in_roll,
ccs.pcp_roll_nickname,
ccs.pcp_personal_note,
ccs.soft_credit_type_id,
sov.label as sct_label,
cc.receive_date,
cc.contact_id as contributor_id,
cc.contribution_status_id as contribution_status_id,
cov.label as contribution_status,
cp.title as pcp_title,
cc.currency,
contact.display_name as contributor_name,
cct.name as financial_type
FROM civicrm_contribution_soft ccs
LEFT JOIN civicrm_contribution cc
ON ccs.contribution_id = cc.id
LEFT JOIN civicrm_pcp cp
ON ccs.pcp_id = cp.id
LEFT JOIN civicrm_contact contact ON
ccs.contribution_id = cc.id AND cc.contact_id = contact.id
LEFT JOIN civicrm_financial_type cct ON cc.financial_type_id = cct.id
LEFT JOIN civicrm_option_value sov ON sov.option_group_id = %3 AND ccs.soft_credit_type_id = sov.value
LEFT JOIN civicrm_option_value cov ON cov.option_group_id = %4 AND cc.contribution_status_id = cov.value
WHERE cc.is_test = %2 AND ccs.contact_id = %1 ORDER BY cc.receive_date DESC ;
23.
------------------------------------
SELECT count( x.id ) count FROM (
SELECT contribution.id AS id
FROM civicrm_contribution contribution
LEFT JOIN civicrm_line_item i ON i.contribution_id = contribution.id AND i.entity_table = 'civicrm_contribution' AND i.financial_type_id NOT IN (3,1,4,2)
WHERE contribution.is_test = 0 AND contribution.contact_id = 76
AND contribution.financial_type_id IN (3,1,4,2)
AND i.id IS NULL UNION
SELECT contribution.id
FROM civicrm_contribution contribution INNER JOIN civicrm_contribution_soft softContribution
ON ( contribution.id = softContribution.contribution_id )
WHERE contribution.is_test = 0 AND softContribution.contact_id = 76 ) x;5.13.0https://lab.civicrm.org/dev/core/-/issues/704Missing links to cancel recurring payments (regression .. sorta)2019-04-26T23:06:46ZeileenMissing links to cancel recurring payments (regression .. sorta)As a result of https://github.com/civicrm/civicrm-core/commit/c6d558dca61dc68a3b832ad2bf34dc18b4cca4e2 links no longer show an option to cancel recurrings if there is no payment processor. You could argue the toss here but it seems reas...As a result of https://github.com/civicrm/civicrm-core/commit/c6d558dca61dc68a3b832ad2bf34dc18b4cca4e2 links no longer show an option to cancel recurrings if there is no payment processor. You could argue the toss here but it seems reasonable to thing people would create these rows by api (as we have) to represent recurrings that iteract with other code and which they might wish to cancel
@mattwire I think it might make sense for
CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity
to return the dummy processor (0 => CRM_Core_Manual have that be supportsCancelRecurring = TRUE
- we load the 0 processor in quite a few other places & I see it as something of a standard5.13.0https://lab.civicrm.org/dev/core/-/issues/735Query performance - suppress 'product' and related fields where products are ...2019-04-26T06:50:00ZeileenQuery performance - suppress 'product' and related fields where products are not in the databaseMost people hate the fact we waste an output field on premium on the contribution tab. They all think it should be replaced - but all have different replacements.
I don't want to solve that - I think the right solution for that is to f...Most people hate the fact we waste an output field on premium on the contribution tab. They all think it should be replaced - but all have different replacements.
I don't want to solve that - I think the right solution for that is to find funding to leap the interface.
What I DO think we can solve is the fact we are doing unnecessary joins / queries / processing to generate & display premiums - regardless of whether the site uses them. I think we could short-circuit that pretty cleanly by just doing a quick
"select id FROM civicrm_product_premium LIMIT 1' (cached) before adding product fields to our default return properties (with a small tpl tweak too)5.13.0https://lab.civicrm.org/dev/core/-/issues/891mailing preview fails when viewUrl token present and mailing hash enabled.2019-04-25T06:07:12Zlcdwebmailing preview fails when viewUrl token present and mailing hash enabled.This is similar to: https://lab.civicrm.org/dev/mail/issues/41
The presence of the mailing.viewUrl token with the mailing hash setting enabled expects the Mailing ID, which is not passed with the preview action (for performance reasons).This is similar to: https://lab.civicrm.org/dev/mail/issues/41
The presence of the mailing.viewUrl token with the mailing hash setting enabled expects the Mailing ID, which is not passed with the preview action (for performance reasons).5.13.0lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/865Result filter criteria doesn't show IS NULL/IS NOT NULL for operations2019-04-15T05:32:20ZyashodhaResult filter criteria doesn't show IS NULL/IS NOT NULL for operationsWe can not search all contributions that are not associated with a campaign currently in report. We should expose IS NULL/IS NOT NULL for other operators as wellWe can not search all contributions that are not associated with a campaign currently in report. We should expose IS NULL/IS NOT NULL for other operators as well5.13.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/499Custom Field Checkbox value renders empty if the values are randomly sorted2019-04-05T21:12:33ZbgmCustom Field Checkbox value renders empty if the values are randomly sortedHow to reproduce:
* Create a new Alphanumeric/Checkbox custom field
* Create new options with this specific order:
![Capture_d_écran_de_2018-11-01_14-36-36](/uploads/5f8e93a00ed763c5ec3b835de68b4ae5/Capture_d_écran_de_2018-11-01_14-36-...How to reproduce:
* Create a new Alphanumeric/Checkbox custom field
* Create new options with this specific order:
![Capture_d_écran_de_2018-11-01_14-36-36](/uploads/5f8e93a00ed763c5ec3b835de68b4ae5/Capture_d_écran_de_2018-11-01_14-36-36.png)
(Values are prefixed with '0' because back in the day, the advanced search would consider that, for example, "9" also matches "99", because of the sql query `custom_field like '%9%'`, but that's another topic.)
Result: the custom field renders empty.
![custom-fields-rendering-empty](/uploads/ba015b59f0ad1e188b9884c1d0601008/custom-fields-rendering-empty.gif)
PS: this seems related, but is not the same issue: #286 (and that issue is for 4.6)5.13.0bgmbgmhttps://lab.civicrm.org/dev/core/-/issues/725Address API incorrectly sets state_province_id if multiple countries have sam...2019-04-03T18:25:00ZjackrabbithannaAddress API incorrectly sets state_province_id if multiple countries have same state name / abbreviationReplicable on dmaster.demo
The Address API is not taking into account the country_id when figuring the state_province_id when given the state name or state abbreviation, even if country_id is provided...
Example:
```
$result = civi...Replicable on dmaster.demo
The Address API is not taking into account the country_id when figuring the state_province_id when given the state name or state abbreviation, even if country_id is provided...
Example:
```
$result = civicrm_api3('Address', 'create', [
'contact_id' => 206,
'location_type_id' => "Main",
'city' => "Baltimore",
'state_province_id' => "Maryland",
'country_id' => 1228,
]);
```
Output:
```
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 193,
"values": {
"193": {
"id": "193",
"contact_id": "206",
"location_type_id": "3",
"is_primary": "1",
"is_billing": "0",
"city": "Baltimore",
"state_province_id": "3497",
"country_id": "1228",
"manual_geo_code": "0"
}
}
}
```
Notice the state_province_id is 3497, which is Maryland, Liberia. It should be 1019.
This happens regardless of which countries are enabled in the Localization settings. It also does not respect the "default country" setting, if the country_id is not provided.5.13.0https://lab.civicrm.org/dev/core/-/issues/288Use the correct membership date for the notification that appear after comple...2019-04-01T21:27:31Zomar_compucorpUse the correct membership date for the notification that appear after completing the membership payment in case pre hook is usedSuppose you have an extension that implements **hook_civicrm_pre** on membership entity that add 1 year (or whatever amount of time) to the membership new end date whenever someone completed a pending payment for the membership, Based on...Suppose you have an extension that implements **hook_civicrm_pre** on membership entity that add 1 year (or whatever amount of time) to the membership new end date whenever someone completed a pending payment for the membership, Based on this assume the following example :
1- You created a pending membership starts today (27/7/2018) and ends in 1 year (26/7/2019).
2- You changed this membership payment (contribution) from "pending" to "completed".
Now without the hook implementation as explained above, the following message will appear :
```
the contribution record has been saved.
Membership for "CONTACT NAME" has been updated. The membership End Date is July 26th, 2019.
```
and the membership status will be change from Pending to New, And the end date of the membership will be similar to the one shown in the notification message which is 26/7/2019 which is all good.
But when you have the pre hook implemented as suggest above, the membership end date will be 26/7/2020 (since the hook add one year to the end date) but the notification message will still indicate the old end date which is 26/7/2019. This is wrong and the notification message should show the correct end date that reflects the membership actual end date.5.13.0https://lab.civicrm.org/dev/core/-/issues/840Notice error when deleting profile2019-04-01T20:36:27ZPradeep Nayakpradpnayak@gmail.comNotice error when deleting profileTo replicate: Delete profile
`Notice: Undefined property: CRM_UF_Form_Group::$deleteMessage in /var/www/vhosts/xxxx/httpdocs/portal-login/wp-content/plugins/civicrm/civicrm/CRM/Core/Form/EntityFormTrait.php on line 65`
CiviCRM version...To replicate: Delete profile
`Notice: Undefined property: CRM_UF_Form_Group::$deleteMessage in /var/www/vhosts/xxxx/httpdocs/portal-login/wp-content/plugins/civicrm/civicrm/CRM/Core/Form/EntityFormTrait.php on line 65`
CiviCRM version: 5.11.05.13.0https://lab.civicrm.org/dev/core/-/issues/836Do not track CSS urls2019-03-31T20:27:29ZseamusleeDo not track CSS urlsAt the moment in Civimail if someone inserts a link tag like
```
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700' rel='stylesheet' type='text/css'>
```
CiviMail will convert it into a tr...At the moment in Civimail if someone inserts a link tag like
```
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700' rel='stylesheet' type='text/css'>
```
CiviMail will convert it into a trackable url5.13.0https://lab.civicrm.org/dev/core/-/issues/837Notice error while creating smart group using Contribution Aggregate custom s...2019-03-31T20:27:05ZPradeep Nayakpradpnayak@gmail.comNotice error while creating smart group using Contribution Aggregate custom search```
Notice: Undefined index: contribution_date_relative in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 204 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggre...```
Notice: Undefined index: contribution_date_relative in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 204 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_low in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 205 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_high in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 206 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_relative in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 204 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_low in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 205 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_high in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 206 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_relative in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 204 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_low in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 205 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
Notice: Undefined index: contribution_date_high in CRM_Contact_Form_Search_Custom_ContributionAggregate->where() (line 206 of /Users/pradeep/Sites/drupal7/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom/ContributionAggregate.php).
```5.13.0https://lab.civicrm.org/dev/core/-/issues/829Swaziland has changed its name to Eswatini2019-03-28T20:07:12Zlord_tSwaziland has changed its name to EswatiniSwaziland country has changed name to Eswatini so in CiviCRM it also has to be changed.
> On 19 April 2018, King Mswati III announced that the Kingdom of Swaziland had renamed itself the Kingdom of Eswatini, reflecting the extant Swazi...Swaziland country has changed name to Eswatini so in CiviCRM it also has to be changed.
> On 19 April 2018, King Mswati III announced that the Kingdom of Swaziland had renamed itself the Kingdom of Eswatini, reflecting the extant Swazi name for the state eSwatini, to mark the 50th anniversary of Swazi independence. The new name, **Eswatini**, [...]
Source: https://en.wikipedia.org/wiki/Eswatini#Independence_(1968%E2%80%93present)
Patch: https://github.com/civicrm/civicrm-core/pull/139025.13.0https://lab.civicrm.org/dev/core/-/issues/819Search results: Actions: Export contacts: DB Error: Syntax error occurs when ...2019-03-27T20:08:45ZPradeep Nayakpradpnayak@gmail.comSearch results: Actions: Export contacts: DB Error: Syntax error occurs when not all necessary fields are selectedSTR:
* Navigate to "Search→Find Contacts"
* Leave the search fields empty and click "Search"
* Select any Individual
* Click the "Actions" dropdown
* Select "Export Contacts"
* Click the "Select fields for export" radio button
* Click ...STR:
* Navigate to "Search→Find Contacts"
* Leave the search fields empty and click "Search"
* Select any Individual
* Click the "Actions" dropdown
* Select "Export Contacts"
* Click the "Select fields for export" radio button
* Click "Continue"
* On the Select Fields to Export step, click the "Select record type" dropdown
* Select "Individual"
* Leave the "Select field" dropdown empty
* Click "Export"
**Result:** DB Error: syntax error occurs. Please take a look at the attachment
![ExportError-Before](/uploads/e97b8cb4b4dfb1ae5fed72dafcd4e459/ExportError-Before.gif)5.13.0https://lab.civicrm.org/dev/core/-/issues/784Creating a new relationship type while editing case type definition adds a bl...2019-03-24T20:47:10ZDaveDCreating a new relationship type while editing case type definition adds a blank row in the roles sectionCame across this while working on dev/core#774. Making it a separate child issue (or trying to) since the cause is different and can reproduce separately on the public demo. The cause is that crmCaseType.js accesses data.relationshipType...Came across this while working on dev/core#774. Making it a separate child issue (or trying to) since the cause is different and can reproduce separately on the public demo. The cause is that crmCaseType.js accesses data.relationshipType.label_b_a as if it was an object member but it actually looks like data.relationshipType.19.label_b_a, where 19 is the newly created id.
By "new relationship type" I mean on the case type edit admin screen where you have the dropdown to add a role, if you start typing in the dropdown and it doesn't match an existing relationship type it gives you a "(new)" hint where you can click to create the new relationship type on the fly.5.13.0