CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-04-22T16:17:01Zhttps://lab.civicrm.org/dev/core/-/issues/3319Creating a relationship fails when a related membership has a contact referen...2022-04-22T16:17:01ZjaapjansmaCreating a relationship fails when a related membership has a contact reference custom field.**How to reproduce?**
1. Create a new membership type. Set **Relationship type** to Employer of
2. Create a custom field set for this membership type
3. Add a custom field of type Contact Reference
4. Create a new organization
5. Add th...**How to reproduce?**
1. Create a new membership type. Set **Relationship type** to Employer of
2. Create a custom field set for this membership type
3. Add a custom field of type Contact Reference
4. Create a new organization
5. Add the membership and fill in a value at the custom field
6. Now add a **Employer of** relationship between this organization and an Individual, press save
**Expected results**
Relationship gets saved and a related membership is created with the correct value for the custom field
**Actual results**
No relationship is created, no error is shown, the civicrm logo stays on the screen turning around.
Also when refreshing the page an error popups with something: **custom_xx is not a valid integer**
**Extra information**
When debuging this issue I disovered that a `Membership.get` api is used. And those values are passed to a `Membership.create` api call. The paramaters for the custom field have the format of `custom_xx = 'Joe'` and `custom_xx_id = 202`5.39.0jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/3318CiviMember new priceset syntax error2023-12-31T05:03:29Zchris.hCiviMember new priceset syntax errorCiviMember New Priceset page (/admin/price&reset=1&action=add) shows a error (DB Error:snytax error)
Site Info
- CiviCRM 5.24.4
- Drupal 7
- PHP 7.2
- MySQL 5.7.29
- Ubuntu 18.04 LTSCiviMember New Priceset page (/admin/price&reset=1&action=add) shows a error (DB Error:snytax error)
Site Info
- CiviCRM 5.24.4
- Drupal 7
- PHP 7.2
- MySQL 5.7.29
- Ubuntu 18.04 LTShttps://lab.civicrm.org/dev/core/-/issues/3317Renewal changes membership start date2022-04-22T16:16:58ZedvanleeuwenRenewal changes membership start dateWhen I renew a membership, the start date is now set to the first date of the membership period. According to the documentation it should not change:
> If the renewal is processed when the membership status is one that has a Yes in the m...When I renew a membership, the start date is now set to the first date of the membership period. According to the documentation it should not change:
> If the renewal is processed when the membership status is one that has a Yes in the member column on Administer > CiviMember > Membership Status Rules then the Start date does not change and the end date is extended by the duration of the renewal.
![image](/uploads/d600b126d469a36aff6d9b1a7545c01c/image.png)https://lab.civicrm.org/dev/core/-/issues/3316[regression] can't create recurring memberships from membership tab w/ credit...2022-04-22T16:16:57ZJonGold[regression] can't create recurring memberships from membership tab w/ credit card### To replicate
* Create a new recurring membership via the "Submit Credit Card Membership" button on the membership tab.
When you do so, the Contribution and ContributionRecur will be created, but the membership will fail to be create...### To replicate
* Create a new recurring membership via the "Submit Credit Card Membership" button on the membership tab.
When you do so, the Contribution and ContributionRecur will be created, but the membership will fail to be created.
This happens on 5.17.0 to 5.17.4. It does NOT happen on 5.16.4. It appears to be related to [PR 14887](https://github.com/civicrm/civicrm-core/pull/14887). I'm executing [this block of code](https://github.com/civicrm/civicrm-core/blob/82ce7f0bcf49d3ee47f158024c124cce0872beba/CRM/Member/BAO/Membership.php#L379-L396) which means that my `$ids['contribution']` is empty.
Backtrace:
```
Sep 19 15:43:13 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -5
[message] => DB Error: already exists
[mode] => 16
[debug_info] => INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , price_field_id , label , qty , unit_price , line_total , price_field_value_id , financial_type_id ) VALUES ('civicrm_membership' , 49212 , 68001 , 2 , 'Under $5,000 (monthly recurring)' , 1 , 1 , 1 , 12 , 7 ) [nativecode=1062 ** Duplicate entry 'civicrm_membership-49212-68001-12-2' for key 'UI_line_item_value']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , price_field_id , label , qty , unit_price , line_total , price_field_value_id , financial_type_id ) VALUES ('civicrm_membership' , 49212 , 68001 , 2 , 'Under $5,000 (monthly recurring)' , 1 , 1 , 1 , 12 , 7 ) [nativecode=1062 ** Duplicate entry 'civicrm_membership-49212-68001-12-2' for key 'UI_line_item_value']
[to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , price_field_id , label , qty , unit_price , line_total , price_field_value_id , financial_type_id ) VALUES ('civicrm_membership' , 49212 , 68001 , 2 , 'Under $5,000 (monthly recurring)' , 1 , 1 , 1 , 12 , 7 ) [nativecode=1062 ** Duplicate entry 'civicrm_membership-49212-68001-12-2' for key 'UI_line_item_value']"]
)
Sep 19 15:43:13 [info] $backTrace = #0 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(236): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: already exists", -5, 16, (Array:2), "INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...")
#3 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-5, 16, (Array:2), "INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...")
#4 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -5, 16, (Array:2), "INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...", "DB_Error", TRUE)
#5 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-5, NULL, NULL, "INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...", "1062 ** Duplicate entry 'civicrm_membership-49212-68001-12-2' for key 'UI_lin...")
#7 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...")
#9 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...")
#10 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1040): DB_DataObject->_query("INSERT INTO civicrm_line_item (entity_table , entity_id , contribution_id , p...")
#11 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(572): DB_DataObject->insert()
#12 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php(86): CRM_Core_DAO->save()
#13 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php(471): CRM_Price_BAO_LineItem::create((Array:11))
#14 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Member/BAO/Membership.php(400): CRM_Price_BAO_LineItem::processPriceSet(49212, (Array:1), Object(CRM_Contribute_BAO_Contribution))
#15 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Membership.php(1526): CRM_Member_BAO_Membership::create((Array:43), (Array:1))
#16 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Membership.php(927): CRM_Member_Form_Membership->submit()
#17 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(495): CRM_Member_Form_Membership->postProcess()
#18 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(169): CRM_Core_Form->mainProcess()
#19 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(136): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Member_Form_Membership), "upload")
#20 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Member_Form_Membership), "upload")
#21 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Member_Form_Membership), "upload")
#22 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("upload")
#23 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Member/Page/Tab.php(301): CRM_Core_Controller->run()
#24 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Member/Page/Tab.php(374): CRM_Member_Page_Tab->edit()
#25 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(290): CRM_Member_Page_Tab->run((Array:4), NULL)
#26 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#27 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#28 /var/www/mysite.org/wp-content/plugins/civicrm/civicrm.php(1436): CRM_Core_Invoke::invoke((Array:4))
#29 /var/www/mysite.org/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#30 /var/www/mysite.org/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#31 /var/www/mysite.org/wp-includes/plugin.php(465): WP_Hook->do_action((Array:1))
#32 /var/www/mysite.org/wp-admin/admin.php(253): do_action("toplevel_page_CiviCRM")
#33 {main}
```https://lab.civicrm.org/dev/core/-/issues/3315Extend api action 'calc' of 'membership_status' with custom date2023-12-31T05:03:29ZwdecraeneExtend api action 'calc' of 'membership_status' with custom dateAt this moment `civicrm_api3_membership_status_calc` only accepts the parameter `membership_id`. The function `CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate` used for calculation gets 'today' as hardcoded param.
Patch attac...At this moment `civicrm_api3_membership_status_calc` only accepts the parameter `membership_id`. The function `CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate` used for calculation gets 'today' as hardcoded param.
Patch attached extends this call with an optional status_date.
[membership_status_calc_optional_status_date.patch](/uploads/09d82a96caec87fc4e2388fb85d421c4/membership_status_calc_optional_status_date.patch)https://lab.civicrm.org/dev/core/-/issues/3312A Contact with a Pending membership cannot be merged with another Contact due...2022-04-22T16:16:45Zjustinfreeman (Agileware)A Contact with a Pending membership cannot be merged with another Contact due to missing membership End DateA Contact with a Pending membership cannot be merged with another Contact due to missing membership End Date.
The membership End Date is not set on a pending membership.
The sequence of events is:
1. Contact signs up for new membership
...A Contact with a Pending membership cannot be merged with another Contact due to missing membership End Date.
The membership End Date is not set on a pending membership.
The sequence of events is:
1. Contact signs up for new membership
1. Contact already exists in CiviCRM (as a non-member) - or is similar contact
1. CiviCRM Admin tries to merge the two Contacts
1. The generic: DB Error: unknown error is then raised
Copy of error from CiviCRM logs.
```
Dec 06 12:32:20 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=1292 ** Incorrect date value: '' for column 'end_date' at row 1]
[type] => DB_Error
[user_info] => UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=1292 ** Incorrect date value: '' for column 'end_date' at row 1]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=12
92 ** Incorrect date value: '' for column 'end_date' at row 1]"]
)
```
Agileware Ref: CIVICRM-1122https://lab.civicrm.org/dev/core/-/issues/3310Manually setting premium causes price mismatch2022-04-22T16:16:34ZsudomanManually setting premium causes price mismatchOn CiviCRM 5.24.3, when editing a contribution to add a premium, the minimum required prices for premiums at the middle and bottom of the drop down list are incorrect, and belong with other premiums. The last two have missing premium pri...On CiviCRM 5.24.3, when editing a contribution to add a premium, the minimum required prices for premiums at the middle and bottom of the drop down list are incorrect, and belong with other premiums. The last two have missing premium price entries.
This matters, because CiviCRM limits which premiums can be applied to a transaction in the admin interface, based on the minimum premium price.
I experimented with removing the '+' symbol from two premiums, but that did not resolve the issue.
Thanks! : )https://lab.civicrm.org/dev/core/-/issues/3309Deleting memberships does not delete its related line item.2023-12-30T05:03:26ZjitendraDeleting memberships does not delete its related line item.To replicate -
- Create a membership.
- A new row is inserted in civicrm_line_item.
- Delete the membership from civicrm.
- The line item row remains as it is and is never removed from the database.
@eileen @JoeMurray @monish.deb Do w...To replicate -
- Create a membership.
- A new row is inserted in civicrm_line_item.
- Delete the membership from civicrm.
- The line item row remains as it is and is never removed from the database.
@eileen @JoeMurray @monish.deb Do we really need this information in the table?jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/3308Membership end date is miscalculated on recurring payments that fail temporarily2023-12-29T05:42:34ZJonGoldMembership end date is miscalculated on recurring payments that fail temporarilyMembership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment ...Membership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment goes through on time, the membership end date is extended properly to 2020-04-30. However, if the payment fails, Paypal will retry 5 days later. If it goes through at that time, the membership end date will also be extended for 5 days.https://lab.civicrm.org/dev/core/-/issues/3307Membership by Relationship not created when Current Employer field is updated2023-05-18T23:24:43ZalanpuccinelliMembership by Relationship not created when Current Employer field is updatedIt used to be that when a Current Employer was added to a profile it would automatically build the Relationship AND any Related membership. It now only seems to do the Relationship and you have to edit and re-save the profile and then th...It used to be that when a Current Employer was added to a profile it would automatically build the Relationship AND any Related membership. It now only seems to do the Relationship and you have to edit and re-save the profile and then the Membership will add.https://lab.civicrm.org/dev/core/-/issues/3306Expired Membership Renewal Payment w/ Multiple Periods renews incorrectly wit...2023-12-29T05:03:21ZjptillmanExpired Membership Renewal Payment w/ Multiple Periods renews incorrectly with pending paymentI've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry...I've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry in the renewal form)
* Make the payment "Pending" and save. The fees are calculated correctly and the contribution is created as Pending.
* Go to the payment and "Receive payment"
* The membership only rolls forward one period when the contribution is finally completed.
Alternatively, if I make the payment "Complete" when filling out the renewal form (no pending payment), it works fine and rolls the membership forward 2 periods.https://lab.civicrm.org/dev/core/-/issues/3305Allow overriding membership status temporarily until specific date2022-04-22T16:16:26Zomar_compucorpAllow overriding membership status temporarily until specific date## Overview
Improving membership status override to provide extra options to allow temporary status override.
## Details
Instead of having a checkbox called (Override Status?) in membership add/edit/renew form, it will be replaced wi...## Overview
Improving membership status override to provide extra options to allow temporary status override.
## Details
Instead of having a checkbox called (Override Status?) in membership add/edit/renew form, it will be replaced with a select box that allow the user to choose one of three options :
1- No
2- Override Permanently
3- Override until selected date
- If the first option is selected, then the membership will behave as if the old (Override Status?) is **unchecked**, which means that the membership is subject to membership status rules.
- If the 2nd option is selected, then the membership will behave as if the old (Override Status?) is **checked**, which mean that the membership status is overridden and is not subject to the membership statues rules.
- If the 3rd option is selected, then a new field will appear allowing the user to choose a date, in this status, the membership will behave similar to option 2, but when today date is equal or less than the selected date, then the "Update Membership Statuses" scheduled job will automatically convert its status back to **No**, which means that the membership status is overridden temporarily only for the selected date and after that it will revert back and be subject to membership status rules
## Mocks
![Screen_Shot_2018-01-12_at_18.09.22__1_](/uploads/17bbabdc32947f63399d37e9af7652e6/Screen_Shot_2018-01-12_at_18.09.22__1_.png)
## Most notable Technical Details :
civicrm_memebership.is_override field is removed, and two alternative fields are added, once is called status_override_type (DEFAULT 0) , and the other is status_override_end_date (DEFAULT NULL).
status_override_type may contain 0 (means no override), 1 (means override Permanently) or 3 (means Override until selected date), where status_override_end_date will contain the override end date in case the status override type is 3 (override until selected date).https://lab.civicrm.org/dev/core/-/issues/3304Update multiple membership doesn't set is_override2023-12-19T05:24:51ZDetlev SieberUpdate multiple membership doesn't set is_overrideMembership status rules can be set as "Administrator Only". By doing this, status won't be changed by the process_membership scheduled job anymore, but can only be changed with the is_override option by an administrator. This makes sense...Membership status rules can be set as "Administrator Only". By doing this, status won't be changed by the process_membership scheduled job anymore, but can only be changed with the is_override option by an administrator. This makes sense e.g. for a custom status as "expelled" or "excluded". When I want to change the membership status to "excluded", I have to use the is_override option, and the field is_override in civicrm_membership is set to "1".
However, when I update several memberships at once with the action "Update multiple memberships" (via profile) to "excluded", the status is changed correctly. But is_override isn't changed, so that with the next run of the scheduled job "process_membership", the status will be updated again according to the status rules - which is not what we want!
Instead, when changing a membership status which is marked "Administrator Only", the field "is_override" should be set automatically - the same way it would be done when I change 1 membership manually.https://lab.civicrm.org/dev/core/-/issues/3300Regression - js error due to alertDismissal setting2022-04-22T16:05:04ZeileenRegression - js error due to alertDismissal settingjs error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/ci...js error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/civicrm\/";
CRM.config.lcMessages = "en_US";
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = "mm\/dd\/yy";
CRM.config.timeIs24Hr = false;
CRM.config.ajaxPopupsEnabled = true;
CRM.config.allowAlertAutodismissal = ;
```
@justinfreeman @monish.deb @JoeMurray - not in released versionMonish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3299Make alerts accessible2022-04-22T16:04:58ZJoeMurrayMake alerts accessibleFrom Clare comes a problem statement and some brainstorming ideas:
> A problem for our low vision users is alerts, their AT software doesn't recognise them, so they miss warnings and end up adding duplicates. It would be great to have s...From Clare comes a problem statement and some brainstorming ideas:
> A problem for our low vision users is alerts, their AT software doesn't recognise them, so they miss warnings and end up adding duplicates. It would be great to have some sort of per user control for setting how alerts display, perhaps even adding audio cues.
Use alert role approach suggested at https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/alert/index.html as this will allow audio cues to be given to users of screen readers.
Note more details at https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/#alert and also https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/#alertdialog
https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-no-exceptions.html indicates that there should be no time limits like quickly disappearing alerts.
As a first pass, let's implement a site wide setting to disable alerts from disappearing. We don't have a good design pattern currently for per user preferences. When we do move to per user preferences, the default should be to have alerts not disappear.justinfreeman (Agileware)justinfreeman (Agileware)https://lab.civicrm.org/dev/core/-/issues/3298Make select2 widgets accessible2022-04-22T16:04:58ZMonish DebMake select2 widgets accessibleFrom https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Civi makes use of the Select2 library in a number of places to generate certain pop-up lists. Basically, the library creates an edit-co...From https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Civi makes use of the Select2 library in a number of places to generate certain pop-up lists. Basically, the library creates an edit-combo box (one where you have both a pre-defined list of options, but can also type in to narrow this list). While these elements are keyboard accessible, there are occasionally focus issues. As an example, choosing a date range filter on searches offers selections like, “previous year,” but also allows the user to choose a date range. When selecting the choose a date range option edit fields appear next to the dropdown allowing the user to enter a start and end date range. However, for a screen reader user, pressing TAB after selecting this option will focus on the next group of fields, bypassing the date range fields. Although they don’t use Select2, this behavior is also observed with combo boxes that dynamically populate other combo boxes (like on the import data screens).
Tech spec to come.https://lab.civicrm.org/dev/core/-/issues/3297replace select2 with latest stable2022-04-22T16:04:56ZJoeMurrayreplace select2 with latest stableCurrently, Civi is using select2 3.5 which we need to upgrade to latest stable 4.0.5, maybe 4.0.6 (https://github.com/select2/select2/releases) and then resolve compatibility issues with CiviCRM.
The upgrade from 3.5 to 4.x contains num...Currently, Civi is using select2 3.5 which we need to upgrade to latest stable 4.0.5, maybe 4.0.6 (https://github.com/select2/select2/releases) and then resolve compatibility issues with CiviCRM.
The upgrade from 3.5 to 4.x contains numerous breaking changes that affect the calling code in CiviCRM.
Major issues:
1. Auto appending values doesn't work anymore
Error: Uncaught TypeError: Cannot read property 'prop' of undefined
LOC - https://github.com/civicrm/civicrm-core/blob/master/js/crm.searchForm.js#L9
Reference - https://select2.org/upgrading/migrating-from-35#select2-val
2. Placeholder broken
Error: Uncaught TypeError: Cannot read property 'id' of undefined
As per 3.5 - placeholderOption is used to set the placeholder value for select2 widget
As per 4.0.4 - placeholder option can now accept placeholder value both in string and object
Reference - https://select2.org/upgrading/migrating-from-35#more-flexible-placeholders
3. EntityRef select2 fields are broken
Error: Uncaught Error: No select2/compat/initSelection
As per 4.0.4 - Removed the requirement of 'initSelection'
Reference - https://select2.org/upgrading/migrating-from-35#removed-the-requirement-of-initselection
4. Navigation menu style is not applied
Error: Uncaught TypeError: Cannot read property 'prop' of undefined
As per 4.0.4 - $("select").val("1").trigger("change"); // instead of $("select").select2("val", "1");
Reference - https://select2.org/upgrading/migrating-from-35#select2-val
Minor issues
1. Multi select2 widget doesn't show downarrow placeholder icon
2. select2 css style isn't applied after upgrade
migration of old JIRA issue with some additional discussion at https://issues.civicrm.org/jira/browse/CRM-21263https://lab.civicrm.org/dev/core/-/issues/3296Add aria-label (and label?) to form elements missing them2022-04-22T16:04:46ZJoeMurrayAdd aria-label (and label?) to form elements missing themUse accessible labels for all pages/forms following spec at https://www.w3.org/WAI/tutorials/forms/labels.
Tasks will include the following general points. Some details will change to ensure that ts() is handled properly, addField() is...Use accessible labels for all pages/forms following spec at https://www.w3.org/WAI/tutorials/forms/labels.
Tasks will include the following general points. Some details will change to ensure that ts() is handled properly, addField() is used appropriately, etc from comments below:
1. Label without control elements/text: In some pages/forms we are simply declaring labels under `<label>` tag against an element/text.
1. Remove tag when it is declared against a text as in
```
- <div class="label"><label>{ts}Contact{/ts}</label></div>
+ <div class="label">{ts}Contact{/ts}</div>
```
1. Add `aria-labelledby` attribute to tag
```
- <label>{ts}Contact{/ts}</label><input type="text" name="contact_id" id="contact_id">
+ <label aria-labelledby="contact_id">{ts}Contact{/ts}</label><input type="text" name="contact_id" id="contact_id">
```
1. Add aria-label attribute to QuickForm element when label is not declared in tpl: Say for example we are assigning a label to a QuickForm element
`$form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3));` but not using it in tpl.
**Fix**: Add aria-label attribute to QuickForm element:
```
- $form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3));
+ $form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3, 'aria-label' => ts('Pledge Installments')));
```
1. Add aria-label attribute to form element via JS: A special case when after declaring this attribute didn't got added to the QuickForm element as in case of 'Credit card Expiration date' when this element got rendered in the quickform as `$form->add('date', 'credit_card_exp_date', ts('Expiration Date'), ['format' => M Y'])` and thus rendered into two select field without this attribute
**Fix**: Add `aria-label` attribute via JS instead. This might involve modifying $.fn.crmDatepicker in Common.js to add aria-labels to the autogenerated date elements it inserts.
1. Fix date fields.
Focus initially on public facing pages/forms:
1. [x] contribution page
1. [x] event registration page
1. [x] price field block
1. [x] newsletter signup
1. [x] user registration in CMS
1. [x] profile create/edit/search
1. [x] contact dashboard
1. [x] contact summary page
1. [ ] CiviReports
1. [ ] Search Forms
1. [ ] Backend registration forms
https://lab.civicrm.org/dev/core/-/issues/3293Make menu more accessible2022-04-22T16:04:20ZJoeMurrayMake menu more accessiblePreliminary tasks, many from https://lab.civicrm.org/dev/accessibility/issues/1#note_4855 below:
1. [x] Hide D7 menubar
1. [x] Fix for D8
1. [x] After getting focus into top menu, tabbing and back-tabbing revealed there was something hid...Preliminary tasks, many from https://lab.civicrm.org/dev/accessibility/issues/1#note_4855 below:
1. [x] Hide D7 menubar
1. [x] Fix for D8
1. [x] After getting focus into top menu, tabbing and back-tabbing revealed there was something hidden between Quick Search textbox and the CiviCRM icon. Opening submenus and back-tabbing revealed it was the search options for the Quick Search textbox. Please remove this from tab order.
1. [x] After getting focus into top menu, Space did not open (and when repeated, close) child menu on current item. It should act similarly to Return.
1. [x] When focus is on an item that could be selected to navigate somewhere, Return worked fine but Space did not replicate this.
1. [x] When on an open sub-submenu (eg Contributions > Accounting Batches with Open Batches with focus), using left arrow correctly moved focus to Accounting Batches, but it did not close the sub-submenu.
1. [x] When on a submenu, using left arrow should close the submenu and move focus to parent item. Instead it moved focus to menu item to left of parent item. The submenu was left open when it should have been closed.
~~1. [ ] When on a sub-submenu, escape should only close that level of menu but closes both the sub-submenu and the submenu.~~
1. [ ] "First item in menu bar should be in the tab order (tabindex=0)." (https://staff.washington.edu/tft/tests/menus/index.html). This may be a bit of work to implement in all CMSes but I think tabindex=0 for CiviCRM menu makes sense as the default on CiviCRM pages on default CMS installs. The CiviCRM Menu left item should be considered the QuickSearch. There appears to be an item for a div around the textarea and a separate way to focus on the textarea itself. The div around the textarea should be tabindex=0.
1. [ ] The cited spec is relatively silent, but other accessible menus have different implementations on the following: 1) When focus is on top menu item and its submenu is open, left and right cycle focus to left and right top menu items and shift which submenu is open to the one under the top menu focussed item. 2a) When focus is on a submenu item left closes the submenu, cycles focus to left on top menu and opens that top menu's submenu. 2b) When focus is on a submenu item without a subsubmenu, right similarly closes submenu, cycles focus right on top menu and opens that top menu item's submenu. 2c) When focus is on a submenu item with a subsubmenu, right opens the subsubmenu. Let's change behaviour 1), 2a) and 2b) to not opening new submenu. Leave 2c) as is.
~~1. [ ] When focus is not on the menu, cursor hovering over a menu item brings focus to it and opens submenu. Submenu should not open until click, return or space.~~
A user should be able to navigate the menu bar by use of the keyboard:
1. [ ] The menu bar should occupy one tab stop
1. [ ] When focused on a menu at the top level:
1. [ ] The right arrow key should move the user to the next top-level menu
1. [ ] The left arrow key should move the user to the previous top level menu
1. [ ] User focus should wrap to the beginning if the user advances past the final menu item. Likewise, if the user tries to navigate to the previous item from the first menu, focus should wrap to the last menu.
1. [ ] The down-arrow and ENTER keys should expand a child menu and focus the user on the first item
~~1. [ ] When a character is typed, the next menu item starting with that letter receives the focus, circling around to first when there are no more. If no menu item starts with the typed character, focus does not move. (deprecated by HTML 5.2 accesskey standard)~~
1. [ ] When focused on a child menu
1. [ ] The down arrow key should move the user to the next menu item
1. [ ] The up arrow key should move the user to the previous menu item
1. [ ] The right arrow key should expand a menu item with a submenu and place user focus on the first item in that submenu. If there is no submenu, then no action is taken.
1. [ ] The left arrow key should collapse a submenu and place user focus on the parent of that submenu
1. [ ] The ESC key should close the active child menu, and any submenus, and return user focus to the parent menu at the top level.
~~1. [ ] When a character is typed, the next child menu item starting with that letter receives the focus, circling around to first when there are no more. If no child menu item starts with the typed character, focus does not move. (deprecated by HTML 5.2 accesskey standard)~~
Test the menu works on default installs (ie default theme!) on
1. [x] Drupal 7
1. [x] WordPress
1. [x] Joomla
1. [x] Backdrop
1. [x] Drupal 8
(NB: deliberately ignoring support for Drupal 6.)
Test the menu works on:
1. [x] Drupal 7 site with shoreditch theme installed
1. [x] Drupal 7 site with mosaico installed, on a CiviMail mosaico page.
A more detailed functional spec is provided at http://lists.w3.org/Archives/Public/wai-xtech/2007Dec/att-0025/index.html#menu
A good implementation that might be useful for its implementation details (seeing View Source) is https://staff.washington.edu/tft/tests/menus/simplyaccessible/index.html. As there are no sub-submenus, I imagine the code implementation needs to be extended to opening sub-submenus properly.
Was https://issues.civicrm.org/jira/browse/CRM-20824
Original description from https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
The menu bar is keyboard accessible, but awkwardly. Generally I find it best to focus on the first item then TAB (as opposed to arrowing) to the top level menu the user wants to interact with before pressing ENTER to activate the pop-up menu. You will then have to locate the HTML list element containing the menu choices. Often this element appears after the menu bar, or at the bottom of the virtual document (sometimes depending on the CMS theme, sometimes depending on, seemingly, the browser’s mood). In either case, it will not appear immediately “under” the activated menu.https://lab.civicrm.org/dev/core/-/issues/3291Activity Type and Case Type not being combined correctly in Advanced Search2022-04-22T15:53:58ZalistairjamesActivity Type and Case Type not being combined correctly in Advanced SearchSteps to create (5.29)
- Create CaseType1 containing a Meeting
- Create CaseType2 containing a Meeting
- Create a Case for Contact_A of CaseType1
- Create a Case for Contact_A of CaseType2
Advance Search: Display: Activities, Logical_Op...Steps to create (5.29)
- Create CaseType1 containing a Meeting
- Create CaseType2 containing a Meeting
- Create a Case for Contact_A of CaseType1
- Create a Case for Contact_A of CaseType2
Advance Search: Display: Activities, Logical_Operator: AND, Activity Type: Meeting, Case Type:CaseType1
Search description displayed:
Activity Type ID In Meeting ...AND...
Activity targeted to ...AND...
Case Type(s) In CaseType1 ...AND...
Case = All Cases
Actual Result (two meetings returned instead of one):
Meeting (from CaseType1)
Meeting (from CaseType2)
Nothing I tried enabled me to exclude the Meeting in CaseType2. If a Contact had Cases of both CaseType1 and CaseType2 all their Meetings were reported in the results and the Case Type filter did not work.5.37.0