Development issueshttps://lab.civicrm.org/groups/dev/-/issues2019-06-10T19:02:06Zhttps://lab.civicrm.org/dev/financial/-/issues/61Refund payment can't choose financial type2019-06-10T19:02:06ZMartinRefund payment can't choose financial typeScenario: We have events set up using price sets which include different financial types (event fee, donation, etc). Sometimes a change is needed to the registration, requiring a refund (or an additional payment). In these cases, the ref...Scenario: We have events set up using price sets which include different financial types (event fee, donation, etc). Sometimes a change is needed to the registration, requiring a refund (or an additional payment). In these cases, the refund is divided proportionally between the different financial types. My assumption is that this is by design. In our situation, it would be preferable to allow the user to select what financial type to apply it to.
Example: User registers online for $60 event + $40 donation, and provides payment for $100. Later a staff user modifies the registration to change from $60 to a $50 "student rate" for the event portion, and records a $10 refund.
Current behavior: A $6 refund will appear towards event fee, and a $4 refund will appear towards donation.
Desired behavior: Staff user can select what financial type to apply the $10 towards, so that the entire amount can go towards the event fee. OR, another potential approach would be if civi can recognize the change to the event registration line items, and record the donation accordingly.https://lab.civicrm.org/dev/core/-/issues/1015Errors exporting contributions on 5.13.22019-07-08T21:27:09ZlandbryoErrors exporting contributions on 5.13.2We've been experiencing issues exporting contributions since upgrading to 5.13.2 . I've seen mention that a lot of the export functionality has been getting cleaned up. Has anyone else been having this issue?
**Steps Taken:**
Find Contr...We've been experiencing issues exporting contributions since upgrading to 5.13.2 . I've seen mention that a lot of the export functionality has been getting cleaned up. Has anyone else been having this issue?
**Steps Taken:**
Find Contributions
Choose Date Range: 1/1/19 - 6/3/19
Contribution Amounts: 1 - 10,000,000
Contributions: Both
Financial Type: Donations, Donations: 30/30; Donations: Bequests; Donation: EOY; Donation: Major Donor; Donation: Non-Major; Grant: Corporate; Grants: Foundations; Grant: Government
Click Search
Export All 146 Records
Actions: Export Contributions
Continue
**Error Thrown:**
~~~~#0 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace()
#1 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#3 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#4 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "DB_Error", TRUE)
#5 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "1054 ** Unknown column 'contribution_search_scredit_combined.scredit_idLEFT' ...")
#7 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#9 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#10 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#11 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#12 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", TRUE)
#13 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php(448): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#14 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Export/Form/Select.php(428): CRM_Export_BAO_Export::exportComponents(TRUE, (Array:147), (Array:8), "`receive_date` desc, contact_a.id", NULL, NULL, 2, " civicrm_contribution.id IN ( 46217,46115,46104,46131,46127,46085,46042,46034...", NULL, 0, 0, (Array:5), NULL)
#15 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(490): CRM_Export_Form_Select->postProcess()
#16 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#17 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Export_Form_Select), "next", "Next")
#18 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Export_Form_Select), "next")
#19 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Export_Form_Select), "next")
#20 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(349): HTML_QuickForm_Page->handle("next")
#21 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller->run((Array:3), NULL)
#22 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:14))
#23 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#24 /home/{USERNAME}/public_html/wp-content/plugins/civicrm/civicrm.php(1392): CRM_Core_Invoke::invoke((Array:3))
#25 /home/{USERNAME}/public_html/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#26 /home/{USERNAME}/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#27 /home/{USERNAME}/public_html/wp-includes/plugin.php(465): WP_Hook->do_action((Array:1))
#28 /home/{USERNAME}/public_html/wp-admin/admin.php(253): do_action("toplevel_page_CiviCRM")
DB Error: no such field5.14.0https://lab.civicrm.org/dev/wordpress/-/issues/30use native CiviCRM function to pull page query variable2019-06-07T08:45:46Zlcdwebuse native CiviCRM function to pull page query variablecivicrm_in_wordpress_set() relies on a WP function (get_query_var()) to determine if a frontend page is a CiviCRM page. That WP function pulls get variables from WP globals, but may not have been set yet in various situations. It's prefe...civicrm_in_wordpress_set() relies on a WP function (get_query_var()) to determine if a frontend page is a CiviCRM page. That WP function pulls get variables from WP globals, but may not have been set yet in various situations. It's preferable to use the CiviCRM Request class at this point in the process.lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/1016Small bug with impact on translation in confirm.tpl2019-11-24T06:16:33ZGuillaumeSorelSmall bug with impact on translation in confirm.tplI found that some strings in /sites/all/modules/civicrm/templates/CRM/Contribute/Form/Contribution/Confirm.tpl were not translated because of a line break in code lines 298 >> 301.
`{if $is_pay_later OR $amount LE 0.0}
{ts 1=$...I found that some strings in /sites/all/modules/civicrm/templates/CRM/Contribute/Form/Contribution/Confirm.tpl were not translated because of a line break in code lines 298 >> 301.
`{if $is_pay_later OR $amount LE 0.0}
{ts 1=$button}Your transaction will not be completed until you click the <strong>%1</strong> button. Please click the button one time only.{/ts}
{else}
{ts 1=$button}Your contribution will not be completed until you click the <strong>%1</strong> button. Please click the button one time only.{/ts}
{/if}`
When corrected, theses strings are correctly translated otherwise would they stay in English.5.15.0https://lab.civicrm.org/dev/drupal/-/issues/67WordPress, ipn/extern.php: Call to undefined function get_option() in CRM_Uti...2019-06-05T01:10:28ZFrancis (Agileware)WordPress, ipn/extern.php: Call to undefined function get_option() in CRM_Utils_System_WordPress->getTimeZoneString()Since CiviCRM 5.11.0, the PayPalIPN is trying to get the timezone from the `CRM_Core_Config::singleton()->userSystem`.
This uses `get_option()` when `userSystem` is `CRM_Utils_System_WordPress` which is not available until WordPress is ...Since CiviCRM 5.11.0, the PayPalIPN is trying to get the timezone from the `CRM_Core_Config::singleton()->userSystem`.
This uses `get_option()` when `userSystem` is `CRM_Utils_System_WordPress` which is not available until WordPress is bootstrapped.
At this point, as Joomla Drupal and Backdrop are all bootstrapped in the `extern/ipn.php` script in master & 5.15, it seems the obvious solution is to always call `CRM_Utils_System::loadBootstrap` before running the selected `$paypalIPN` class. I'm also not sure why Joomla would need the user loaded, which is the difference between the Joomla and Drupal/Backdrop calls currently available.
Agileware ref is CIVICRM-1228https://lab.civicrm.org/dev/core/-/issues/1017WordPress, ipn/extern.php: Call to undefined function get_option() in CRM_Uti...2019-06-05T22:31:58ZFrancis (Agileware)WordPress, ipn/extern.php: Call to undefined function get_option() in CRM_Utils_System_WordPress->getTimeZoneString()Since CiviCRM 5.11.0, PayPalIPN is trying to get the timezone from the `CRM_Core_Config::singleton()->userSystem`.
This uses `get_option()` when `userSystem` is `CRM_Utils_System_WordPress` which is not available until WordPress is boot...Since CiviCRM 5.11.0, PayPalIPN is trying to get the timezone from the `CRM_Core_Config::singleton()->userSystem`.
This uses `get_option()` when `userSystem` is `CRM_Utils_System_WordPress` which is not available until WordPress is bootstrapped.
At this point, as Joomla Drupal and Backdrop are all bootstrapped in the `extern/ipn.php` script in master & 5.15, it seems the obvious solution is to always call `CRM_Utils_System::loadBootstrap` before running the selected `$paypalIPN` class. I'm also not sure why Joomla would need the user loaded, which is the difference between the Joomla and Drupal/Backdrop calls currently available.
Agileware ref is CIVICRM-12285.14.0https://lab.civicrm.org/dev/core/-/issues/1018Petition: Social Network Buttons are displayed on irrespective of social med...2022-11-10T05:03:59ZyashodhaPetition: Social Network Buttons are displayed on irrespective of social media share offPetition: Social Network Buttons are displayed on irrespective of setting *Allow sharing through social media?* being off.Petition: Social Network Buttons are displayed on irrespective of setting *Allow sharing through social media?* being off.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1019Monetary Amount Display setting not respected for price set totals2020-12-12T02:47:07ZyashodhaMonetary Amount Display setting not respected for price set totalsSteps to replicate:
-------------------
* Go to Administer > Localization > Language and Currency Change *Monetary Amount Display* to %a %c
* Configure price sets with some amounts
* Use this price set for any event/contribution,etc each...Steps to replicate:
-------------------
* Go to Administer > Localization > Language and Currency Change *Monetary Amount Display* to %a %c
* Configure price sets with some amounts
* Use this price set for any event/contribution,etc each item will respect the amount display but not the total(since it is auto calculated)
![fee](/uploads/3108aee6d5ec0138e8df4b808e8cb759/fee.png)5.24.0https://lab.civicrm.org/dev/core/-/issues/1020Child group can't be enabled through links2022-11-09T05:03:43ZyashodhaChild group can't be enabled through linksSteps to replicate :
--------------------
1. Create a child group of a currently active group
2. Disable the child group
3. Try to activate the child group through Enable link
4. Pop up says Are you sure you want to disable this Group?
...Steps to replicate :
--------------------
1. Create a child group of a currently active group
2. Disable the child group
3. Try to activate the child group through Enable link
4. Pop up says Are you sure you want to disable this Group?
![enable_group](/uploads/76a6a39d9d3c2569e285f7f39346f89a/enable_group.png)https://lab.civicrm.org/dev/core/-/issues/1021“Address History” link for contacts disappeared?2019-06-11T09:04:34Ztapash“Address History” link for contacts disappeared?I used to have an "Address History" link that appeared when an address was updated in CiviCRM 5.10 probably (can't remember the exact version). I have logging turned on in settings.
But since I have updated to the latest 5.13.5 that "Ad...I used to have an "Address History" link that appeared when an address was updated in CiviCRM 5.10 probably (can't remember the exact version). I have logging turned on in settings.
But since I have updated to the latest 5.13.5 that "Address History" link has disappeared. I have checked on https://dmaster.demo.civicrm.org and it does not appear there too. Is it a bug or intentional removal? Any suggestion on how can I get back this please, because it used to be a great feature I think. Thankshttps://lab.civicrm.org/dev/drupal/-/issues/68Drupal8/jquery2019-06-06T17:32:36ZAlanDixonDrupal8/jqueryJquery isn't automatically included on every page by Drupal 8 (like D7), but the js file: libraries/civicrm/crm.drupal8.js assumes it is - i.e. it sez:
<pre>`// Need Drupal's jQuery to listen to this event
jQuery(document).on('drupal...Jquery isn't automatically included on every page by Drupal 8 (like D7), but the js file: libraries/civicrm/crm.drupal8.js assumes it is - i.e. it sez:
<pre>`// Need Drupal's jQuery to listen to this event
jQuery(document).on('drupalToolbarTabChange', function(event, tab) {`</pre>
I'm getting js errors in my console on a contribution page, for example (Uncaught TypeError: jQuery is not a function)https://lab.civicrm.org/dev/core/-/issues/1022Manage Case search filter "Deleted Activities" no longer working2023-07-11T16:09:44ZDaveDManage Case search filter "Deleted Activities" no longer workingOn manage case expand the search filters section just above the activities. There's a checkbox there to show deleted activities. It's no longer working. I think I can see the problem - will make a PR.On manage case expand the search filters section just above the activities. There's a checkbox there to show deleted activities. It's no longer working. I think I can see the problem - will make a PR.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1023E_NOTICE when creating bulk SMS2019-06-06T10:27:12ZDaveDE_NOTICE when creating bulk SMS1. Under Mailings choose New SMS.
2. Start creating the SMS. Click Next.
3. Fill out some text. Click Next.
4. Now when you click any of the three buttons to either go back, submit, or continue later, you get the notice:
`Notice: Undefi...1. Under Mailings choose New SMS.
2. Start creating the SMS. Click Next.
3. Fill out some text. Click Next.
4. Now when you click any of the three buttons to either go back, submit, or continue later, you get the notice:
`Notice: Undefined index: Subject in civicrm_api3_mailing_preview() (line 597 of blah/blah/api/v3/Mailing.php).`
Everything still works, it's just because SMS doesn't have a subject.5.15.0https://lab.civicrm.org/dev/core/-/issues/1024New hook called before CRM_Mailing_BAO_TrackableURL::getTrackerURL()2019-12-19T15:52:56ZscardiniusNew hook called before CRM_Mailing_BAO_TrackableURL::getTrackerURL()I have a extension which adds utm params to links from mailing, these which are trackable later.
https://github.com/WeMoveEU/utmaltor
For this purpose I need new hook which will be called before CRM_Mailing_BAO_TrackableURL::getTracker...I have a extension which adds utm params to links from mailing, these which are trackable later.
https://github.com/WeMoveEU/utmaltor
For this purpose I need new hook which will be called before CRM_Mailing_BAO_TrackableURL::getTrackerURL()https://lab.civicrm.org/dev/core/-/issues/1025Contact.get query wrongly excludes contacts when return includes custom fields2019-06-07T09:14:48ZPatrick Figelpfigel@greenpeace.orgContact.get query wrongly excludes contacts when return includes custom fieldsOn latest master (but not on 5.13 or 5.14), `Contact.get` does not return contacts that do not have any activities if the API call asks for custom fields to be returned. Sample requests:
cv api Contact.get sequential=1 id=203
{
...On latest master (but not on 5.13 or 5.14), `Contact.get` does not return contacts that do not have any activities if the API call asks for custom fields to be returned. Sample requests:
cv api Contact.get sequential=1 id=203
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 203,
"values": [
{
"contact_id": "203",
"contact_type": "Individual",
...
}
]
}
cv api Contact.get sequential=1 return="custom_1" id=203
{
"is_error": 0,
"version": 3,
"count": 0,
"values": []
}
The API call generates this query:
```sql
SELECT contact_a.id as contact_id, civicrm_value_volunteer_com_6.id as civicrm_value_volunteer_com_6_id, civicrm_value_volunteer_com_6.volunteer_project_id_12 as custom_12, civicrm_value_volunteer_inf_5.id as civicrm_value_volunteer_inf_5_id, civicrm_value_volunteer_inf_5.camera_skill_level_11 as custom_11, civicrm_value_constituent_information_1.id as civicrm_value_constituent_information_1_id, civicrm_value_constituent_information_1.most_important_issue_1 as custom_1, civicrm_value_constituent_information_1.marital_status_2 as custom_2, civicrm_value_constituent_information_1.marriage_date_3 as custom_3, civicrm_value_donor_information_3.id as civicrm_value_donor_information_3_id, civicrm_value_donor_information_3.how_long_have_you_been_a_donor_6 as custom_6, civicrm_value_donor_information_3.known_areas_of_interest_5 as custom_5, civicrm_value_food_preference_2.id as civicrm_value_food_preference_2_id, civicrm_value_food_preference_2.soup_selection_4 as custom_4, civicrm_value_civivolunteer_4.id as civicrm_value_civivolunteer_4_id, civicrm_value_civivolunteer_4.volunteer_need_id_7 as custom_7, civicrm_value_civivolunteer_4.time_scheduled_in_minutes_9 as custom_9, civicrm_value_civivolunteer_4.volunteer_role_id_8 as custom_8, civicrm_value_civivolunteer_4.time_completed_in_minutes_10 as custom_10 FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id
LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id
LEFT JOIN civicrm_activity_contact
ON ( civicrm_activity_contact.contact_id = contact_a.id ) LEFT JOIN civicrm_activity
ON ( civicrm_activity.id = civicrm_activity_contact.activity_id
AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 )
INNER JOIN civicrm_contact ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 )
LEFT JOIN civicrm_value_civivolunteer_4 ON civicrm_value_civivolunteer_4.entity_id = `civicrm_activity`.id
LEFT JOIN civicrm_value_constituent_information_1 ON civicrm_value_constituent_information_1.entity_id = `contact_a`.id
LEFT JOIN civicrm_value_donor_information_3 ON civicrm_value_donor_information_3.entity_id = `civicrm_contribution`.id
LEFT JOIN civicrm_value_food_preference_2 ON civicrm_value_food_preference_2.entity_id = `civicrm_participant`.id
LEFT JOIN civicrm_value_volunteer_com_6 ON civicrm_value_volunteer_com_6.entity_id = `civicrm_activity`.id
LEFT JOIN civicrm_value_volunteer_inf_5 ON civicrm_value_volunteer_inf_5.entity_id = `contact_a`.id WHERE ( contact_a.id = '203' ) LIMIT 0, 25
```
It contains an `INNER JOIN` based on `civicrm_activity_contact`, so any contacts without rows in `civicrm_activity_contact` would not be included.
In https://github.com/civicrm/civicrm-core/pull/14394 @eileen managed to get it to `INNER JOIN` on `civicrm_case` as well, so there might be different variants of this issue.5.15.0https://lab.civicrm.org/dev/core/-/issues/1026Email created without location when syncing from CMS account2019-06-11T20:47:12Zaydunsaidan.saunders@squiffle.ukEmail created without location when syncing from CMS accountIf you have a contact record in Civi without an email address, then create a CMS account (where unsupervised dedupe rule matches the CMS account to the Civi contact), then the email address is added to the contact record, but without a l...If you have a contact record in Civi without an email address, then create a CMS account (where unsupervised dedupe rule matches the CMS account to the Civi contact), then the email address is added to the contact record, but without a location. [This was discovered/tested with Drupal but looks like it would apply to all CMSes.]
The problem occurs in `CRM_Core_BAO_UFMatch::updateContactEmail()` where the email is created and is easily fixed by adding eg `$email->location_type_id = 1;`
But digging further ...
- Is there any need to use `CRM_Core_DAO_Email()` directly? Wouldn't `CRM_Core_BAO_Email::create()` be better?
- Do we have guidelines for when API is used within core? ie - is API Email.create ok/preferable?
- Location is not a required field for email addresses, but has to be specified when creating addresses on contacts via the UI. Should it become a required field, possibly with a default value?
- LocationType has a default value so that could be used as the default when creating email addressesaydunsaidan.saunders@squiffle.ukaydunsaidan.saunders@squiffle.ukhttps://lab.civicrm.org/dev/core/-/issues/1027Participant search does not retain filtered results when actions are performed.2022-11-18T05:03:23ZEdselopezParticipant search does not retain filtered results when actions are performed.Steps to replicate:
1. Navigate to Events > Find Participants
2. Find participants by a certain event.
3. Select a few of them and proceed to change their status by selecting the item "Participant status - change" from the actions dropd...Steps to replicate:
1. Navigate to Events > Find Participants
2. Find participants by a certain event.
3. Select a few of them and proceed to change their status by selecting the item "Participant status - change" from the actions dropdown menu.
4. After the status is changed, even though the filters remain selected, only the filter "participant is not a test" which is the default filter, is applied. This results in the search displaying all participants across all events.Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/1028civicrm custom data multiple choice values can be too long for varchar type2023-04-17T05:03:19ZMichael McAndrewcivicrm custom data multiple choice values can be too long for varchar type**Steps to reproduce:**
Create a checkbox field with multiple choice options. Assign long values to the options so that the sum of the length of the values is greater than 255, e.g. 10 options of 30 characters each.
Try and save the fi...**Steps to reproduce:**
Create a checkbox field with multiple choice options. Assign long values to the options so that the sum of the length of the values is greater than 255, e.g. 10 options of 30 characters each.
Try and save the field with all options selected.
You will get an error along the lines of
```
[db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_...[nativecode=1406 ** Data too long for column '...
```
**Proposed fix:**
Add a validation that the sum of the length of the values for multiple choice radio / multiselect groups is less than some number less than 255 (since we also need to take account of all the null seperator characters that CiviCRM adds).
Perform this validation at the API and form layer.https://lab.civicrm.org/dev/wordpress/-/issues/31Warning: hash_equals(): Expected user_string to be a string, null given when ...2019-06-07T16:11:00ZhcallensWarning: hash_equals(): Expected user_string to be a string, null given when looking at a contact's profile via the front endWhen looking at a contact's profile via the front end under Wordpress I get:
Warning: hash_equals(): Expected user_string to be a string, null given in /home/xxx/public_html/domain/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Cont...When looking at a contact's profile via the front end under Wordpress I get:
Warning: hash_equals(): Expected user_string to be a string, null given in /home/xxx/public_html/domain/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php on line 232.
I am on Wordpress 5.2.1 and CiviCRM 5.13.4.
See also https://civicrm.stackexchange.com/questions/28768/hash-equals-expected-user-string-to-be-a-string-null-given-in-contact-bao-co.
Changing line 232 to the following:
```
if (!hash_equals((string)$check, (string)$inputCheck)) {
```
in the file: civicrm\\civicrm\\CRM\\Contact\\BAO\\Contact\\Utils.php
fixed the problem.https://lab.civicrm.org/dev/core/-/issues/1029Warning: hash_equals(): Expected user_string to be a string, null given when ...2020-06-30T18:20:32ZhcallensWarning: hash_equals(): Expected user_string to be a string, null given when looking at a contact's profile via the front endWhen looking at a contact's profile via the front end under Wordpress I get:
Warning: hash_equals(): Expected user_string to be a string, null given in /home/xxx/public_html/domain/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Cont...When looking at a contact's profile via the front end under Wordpress I get:
Warning: hash_equals(): Expected user_string to be a string, null given in /home/xxx/public_html/domain/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php on line 232.
I am on Wordpress 5.2.1 and CiviCRM 5.13.4.
See also https://civicrm.stackexchange.com/questions/28768/hash-equals-expected-user-string-to-be-a-string-null-given-in-contact-bao-co.
Changing line 232 to the following:
` if (!hash_equals((string)$check, (string)$inputCheck)) {`
in the file: civicrm\civicrm\CRM\Contact\BAO\Contact\Utils.php fixed the problem.