Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-04-01T05:03:34Zhttps://lab.civicrm.org/dev/core/-/issues/1859Recurring Contributions: Custom field of type Date Date Select is ignored dur...2023-04-01T05:03:34ZatheiaRecurring Contributions: Custom field of type Date Date Select is ignored during searchesOverview
----------------------------------------
Custom fields of type Date applied to Recurring Contributions are ignored in at least Contact Advanced Searches. The search returns results as if the custom date field in question is lef...Overview
----------------------------------------
Custom fields of type Date applied to Recurring Contributions are ignored in at least Contact Advanced Searches. The search returns results as if the custom date field in question is left empty entirely.
https://chat.civicrm.org/civicrm/pl/pde69cq1stfdpg6oesi4jzihir
Reproduction steps
----------------------------------------
1. Click on **Administer-> Customize Data and Screens -> Custom Fields**
2. Click on **Add set of Custom Fields**
3. Enter a Set Name, set **Used for** to **Recurring Contributions**, and click **Save**.
4. Add a Field label, Set **Data and Input Field Type** to **Date**, set **Date Format** to **mm/dd/yy**, **Is this Field Searchable?** : **Yes**, and click **Save**.
5. Create a recurring contribution (e.g. on dmaster: https://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=ContributionRecur&action=create&api_key=userkey&key=sitekey&json={"contact_id":203,"amount":5,"frequency_interval":1,"frequency_unit":"month","is_test":1,"contribution_status_id":"In Progress"})
6. Find the contact for whom the recurring contribution was created, click on **Contributions** then **Recurring Contributions**, then **edit** next to the one you created.
7. Fill in 07/02/20 for your custom date field.
8. Click on **Search** -> **Advanced Search**
9. Click on **Contributions** -> **Recurring Contributions** -> **All Recurring Contributions**, click Search. You will get your user
10. Click **Edit Search Criteria** -> in your custom date field, set **Today**, click Search.
You will still get your search result, even though you filtered by a date that should not have matched.
Current behaviour
----------------------------------------
You will still get your search result, even though you filtered by a date that should not have matched.
Expected behaviour
----------------------------------------
You should get 0 search results (if the above scenario was followed exactly), because your search filter should have excluded all records.
Environment information
----------------------------------------
* __Browser:__ _Firefox Quantum 68.10.0esr_
* __CiviCRM:__ _5.29.alpha1(dmaster)/5.26.2_
* __PHP:__ _dmaster/7.4__
* __CMS:__ _Drupal (dmaster)/Drupal 7.72_
* __Database:__ _dmaster/Ver 15.1 Distrib 10.1.45-MariaDB, for Linux (x86_64) using readline 5.1_
* __Web Server:__ _dmaster/Nginx 1.19_
Comments
----------------------------------------
This is the first time I've reported an issue — apologies if I missed anything!
Let me know if there is anyway I can help.
Best wishes,
Alexhttps://lab.civicrm.org/dev/core/-/issues/1858User account form action not passing along contact id correctly possibly lead...2022-08-17T13:52:08ZseamusleeUser account form action not passing along contact id correctly possibly leading to duplicate contactsOverview
----------------------------------------
When submitting the back office user account creation user contact action the contact id of the user you are creating the account for is not properly passed along and can depending on you...Overview
----------------------------------------
When submitting the back office user account creation user contact action the contact id of the user you are creating the account for is not properly passed along and can depending on your unsupervised dedupe rule create duplicate contact record
Reproduction steps
----------------------------------------
1. Click on Contacts -> Find and Merge Duplicate Contacts and edit the Unsupervised Individual rule to change it from just email to use first and last name as well
1. Navigate to an individual's record that doesn't have a CMS user account
1. Select Actions -> Create User Record
1. Possibly / likely receive a fatal error due to duplicate record in civicrm_uf_match, find that a duplicate contact has been created
Current behaviour
----------------------------------------
Duplicate contact is created when the CMS record is created
Expected behaviour
----------------------------------------
No Duplicate contact is created and the CMS account is properly connected to the contact you are creating the user account for
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __CiviCRM:__ _5.26.0_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.1__
* __CMS:__ _Drupal 8_5.29.0https://lab.civicrm.org/dev/core/-/issues/1857Error on scheduled job, 'mail reports'2020-07-08T05:21:54ZsterndataError on scheduled job, 'mail reports'Notice: Undefined index: message in /var/www/sln/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php on line 285
The error comes from the "mail reports" daily job:
Parameters raw (from db settings):
instanceId=[ID of...Notice: Undefined index: message in /var/www/sln/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php on line 285
The error comes from the "mail reports" daily job:
Parameters raw (from db settings):
instanceId=[ID of report instance] required
format=[csv or print] optional-output CSV or print-friendly HTML, else PDF
Parameters parsed (and passed to API method):
a:3:{s:7:"version";i:3;s:10:"instanceId";s:32:"[ID of report instance] required";s:6:"format";s:67:"[csv or print] optional-output CSV or print-friendly HTML, else PDF";}
Full message:
Finished execution of Mail Reports with result: Failure, Error message: is not of type String
WordPress 5.4.2, PHP 7.3, Civi 5.27.0
Report 32 is "mail opened". When I run this manually, I get an error
Warning: Declaration of CRM_Mailchimp_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in /var/www/sln/wordpress/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.mailchimp/CRM/Mailchimp/Permission.php on line 40
And now I'm at a loss for what to do next.https://lab.civicrm.org/dev/core/-/issues/1856Regression: Detailed "change log" is missing2020-07-12T23:04:50ZtapashRegression: Detailed "change log" is missingAfter upgrading to 5.27 the details of "change log" gone missing, although "Logging" is enabled in settings.
![Screenshot_2020-07-06_at_18.20.00](/uploads/94ac5e7e0ecd81cfee8c270449ce8dd4/Screenshot_2020-07-06_at_18.20.00.png)After upgrading to 5.27 the details of "change log" gone missing, although "Logging" is enabled in settings.
![Screenshot_2020-07-06_at_18.20.00](/uploads/94ac5e7e0ecd81cfee8c270449ce8dd4/Screenshot_2020-07-06_at_18.20.00.png)https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/6The Resource URL is not set correctly.2020-07-05T00:19:31ZKarinGThe Resource URL is not set correctly.While debugging an issue with menus on a local Lando - Pantheon environment -> I came across a new issue re: D8/Composer installs
STEPS to reproduce:
```
karins-MBP:default sysadmin$ date
Fri 3 Jul 2020 10:21:01 MDT
sudo rm -rf d8civic...While debugging an issue with menus on a local Lando - Pantheon environment -> I came across a new issue re: D8/Composer installs
STEPS to reproduce:
```
karins-MBP:default sysadmin$ date
Fri 3 Jul 2020 10:21:01 MDT
sudo rm -rf d8civicrm.local/
composer create-project drupal/recommended-project:8.8.0 d8civicrm.local
cd d8civicrm.local
composer require civicrm/civicrm-core:5.26.2 civicrm/civicrm-packages:5.26.2 civicrm/civicrm-drupal-8:5.26.2 civicrm/civicrm-asset-plugin:~1.0.1
http://d8civicrm.local -> Install Drupal as usual
chmod +w web/sites/default
go to Extend and enable CiviCRM Core
```
Issue: complaining about **Incorrect Resource URL** -> which is interesting as CiviCRM Resource URL is disabled in the GUI (it says it has been set in civicrm.settings.php during the install process):
![image](/uploads/d625caf530bc9fc1ae0159cc63c44e5b/image.png)
![image](/uploads/f2f97c6baf2314c3f71a674df3c9d3a8/image.png)
Interesting note on `bower_components` (related to another issue that got me to review the `civicrm.settings.php` files) ->
These got installed in two places:
```
/Applications/MAMP/htdocs/d8civicrm.local/vendor/civicrm/civicrm-core/bower_components/
/Applications/MAMP/htdocs/d8civicrm.local/web/libraries/civicrm/core/bower_components/
```
Here's my fresh generated by the install process `civicrm.settings.php` file:
```php
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* CiviCRM Configuration File.
*/
global $civicrm_root, $civicrm_setting, $civicrm_paths;
/**
* Content Management System (CMS) Host:
*
* CiviCRM can be hosted in either Drupal 6 or 7, Joomla or WordPress.
*
* Settings for Backdrop CMS:
* define( 'CIVICRM_UF' , 'Backdrop');
*
* Settings for Drupal 7.x:
* define( 'CIVICRM_UF' , 'Drupal');
*
* Settings for Drupal 6.x:
* define( 'CIVICRM_UF' , 'Drupal6');
*
* Settings for Joomla 1.7.x - 2.5.x:
* define( 'CIVICRM_UF' , 'Joomla');
*
* Settings for WordPress 3.3.x:
* define( 'CIVICRM_UF' , 'WordPress');
*
* You may have issues with images in CiviCRM. If this is the case, be sure
* to update the CiviCRM Resource URL field to your CiviCRM root directory
* (Administer::System Settings::Resource URLs).
*/
if (!defined('CIVICRM_UF')) {
if (getenv('CIVICRM_UF')) {
define('CIVICRM_UF', getenv('CIVICRM_UF'));
}
else {
define('CIVICRM_UF', 'Drupal8');
}
}
/**
* Content Management System (CMS) Datasource:
*
* Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, password, server and DB name.
* If any of these contain a single quote or backslash, escape those characters with a backslash: \' and \\, respectively.
*
* Datasource (DSN) format:
* define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
*/
if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
define( 'CIVICRM_UF_DSN' , 'mysql://myadminuser:dbpass@localhost:3306/d8civicrm_local?new_link=true');
}
// Additional settings generated by installer:
$civicrm_paths['civicrm.files']['url'] = 'http://d8civicrm.local//sites/default/files/civicrm';
$civicrm_paths['civicrm.files']['path'] = '/Applications/MAMP/htdocs/d8civicrm.local/web/sites/default/files/civicrm';
/**
* CiviCRM Database Settings
*
* Database URL (CIVICRM_DSN) for CiviCRM Data:
* Database URL format:
* define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
*
* Drupal and CiviCRM can share the same database, or can be installed into separate databases.
* Backdrop CMS and CiviCRM can also share the same database, or can be installed into separate databases.
*
* EXAMPLE: Drupal/Backdrop and CiviCRM running in the same database...
* DB Name = cms, DB User = cms
* define( 'CIVICRM_DSN' , 'mysql://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
*
* EXAMPLE: Drupal/Backdrop and CiviCRM running in separate databases...
* CMS DB Name = cms, DB User = cms
* CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
* define( 'CIVICRM_DSN' , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
*
* If your username, password, server or DB name contain a single quote or backslash, escape those characters
* with a backslash: \' and \\, respectively.
*
*/
if (!defined('CIVICRM_DSN')) {
if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) {
define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
}
else {
define('CIVICRM_DSN', 'mysql://myadminuser:dbpass@localhost:3306/d8civicrm_local?new_link=true');
}
}
/**
* CiviCRM DSN Mode
* Used to determine if you want CiviCRM to automatically change the dsn to mysqli if its avaliable.
* Uncomment and edit below as necessary
*/
// define ('DB_DSN_MODE', 'auto');
/**
* CiviCRM Logging Database
*
* Used to point to a different database to use for logging (if desired). If unset defaults to equal CIVICRM_DSN.
* The CIVICRM_DSN user needs to have the rights to modify the below database schema and be able to write to it.
*/
if (!defined('CIVICRM_LOGGING_DSN')) {
define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);
}
/**
* File System Paths:
*
* $civicrm_root is the file system path on your server where the civicrm
* code is installed. Use an ABSOLUTE path (not a RELATIVE path) for this setting.
*
* CIVICRM_TEMPLATE_COMPILEDIR is the file system path where compiled templates are stored.
* These sub-directories and files are temporary caches and will be recreated automatically
* if deleted.
*
* IMPORTANT: The COMPILEDIR directory must exist,
* and your web server must have read/write access to these directories.
*
*
* EXAMPLE - Drupal:
* If the path to the Drupal home directory is /var/www/htdocs/drupal
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/drupal/sites/all/modules/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/drupal/sites/default/files/civicrm/templates_c/');
*
* EXAMPLE - Backdrop CMS:
* If the path to the Backdrop home directory is /var/www/htdocs/backdrop
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/backdrop/modules/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/backdrop/files/civicrm/templates_c/');
*
* EXAMPLE - Joomla Installations:
* If the path to the Joomla home directory is /var/www/htdocs/joomla
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/joomla/media/civicrm/templates_c/');
*
* EXAMPLE - WordPress Installations:
* If the path to the WordPress home directory is /var/www/htdocs/wordpress and the path to the plugin directory is /var/www/htdocs/wordpress/wp-content/plugins
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/wordpress/wp-content/uploads/civicrm/templates_c/');
*
*/
global $civicrm_root;
$civicrm_root = '/Applications/MAMP/htdocs/d8civicrm.local/vendor/civicrm/civicrm-core/';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/Applications/MAMP/htdocs/d8civicrm.local/web/sites/default/files/civicrm/templates_c');
}
/**
* SMARTY Compile Check:
*
* This tells Smarty whether to check for recompiling or not. Recompiling
* does not need to happen unless a template or config file is changed.
* Typically you enable this during development, and disable for production.
*
* Related issue:
* https://lab.civicrm.org/dev/core/issues/1073
*
*/
//if (!defined('CIVICRM_TEMPLATE_COMPILE_CHECK')) {
// define( 'CIVICRM_TEMPLATE_COMPILE_CHECK', FALSE);
//}
/**
* Site URLs:
*
* This section defines absolute and relative URLs to access the host CMS (Backdrop, Drupal, or Joomla) resources.
*
* IMPORTANT: Trailing slashes should be used on all URL settings.
*
*
* EXAMPLE - Drupal Installations:
* If your site's home url is http://www.example.com/drupal/
* these variables would be set as below. Modify as needed for your install.
*
* CIVICRM_UF_BASEURL - home URL for your site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/drupal/');
*
* EXAMPLE - Backdrop CMS Installations:
* If your site's home url is http://www.example.com/backdrop/
* these variables would be set as below. Modify as needed for your install.
*
* CIVICRM_UF_BASEURL - home URL for your site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/backdrop/');
*
* EXAMPLE - Joomla Installations:
* If your site's home url is http://www.example.com/joomla/
*
* CIVICRM_UF_BASEURL - home URL for your site:
* Administration site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/administrator/');
* Front-end site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/');
*
*/
if (!defined('CIVICRM_UF_BASEURL')) {
define( 'CIVICRM_UF_BASEURL' , 'http://d8civicrm.local');
}
/**
* Define any CiviCRM Settings Overrides per http://wiki.civicrm.org/confluence/display/CRMDOC/Override+CiviCRM+Settings
*
* Uncomment and edit the below as appropriate.
*/
// Override the Temporary Files directory.
// $civicrm_setting['domain']['uploadDir'] = '/path/to/upload-dir' ;
// Override the custom files upload directory.
// $civicrm_setting['domain']['customFileUploadDir'] = '/path/to/custom-dir';
// Override the images directory.
// $civicrm_setting['domain']['imageUploadDir'] = '/path/to/image-upload-dir' ;
// Override the custom templates directory.
// $civicrm_setting['domain']['customTemplateDir'] = '/path/to/template-dir';
// Override the Custom php path directory.
// $civicrm_setting['domain']['customPHPPathDir'] = '/path/to/custom-php-dir';
// Override the extensions directory.
// $civicrm_setting['domain']['extensionsDir'] = '/path/to/extensions-dir';
// Override the resource url
// $civicrm_setting['domain']['userFrameworkResourceURL'] = 'http://example.com/example-resource-url/';
// Override the Image Upload URL (System Settings > Resource URLs)
// $civicrm_setting['domain']['imageUploadURL'] = 'http://example.com/example-image-upload-url';
// Override the Custom CiviCRM CSS URL
// $civicrm_setting['domain']['customCSSURL'] = 'http://example.com/example-css-url' ;
// Override the extensions resource URL
// $civicrm_setting['domain']['extensionsURL'] = 'http://example.com/pathtoextensiondir'
// Disable display of Community Messages on home dashboard
// $civicrm_setting['domain']['communityMessagesUrl'] = false;
// Disable automatic download / installation of extensions
// $civicrm_setting['domain']['ext_repo_url'] = false;
// set triggers to be managed offline per CRM-18212
// $civicrm_setting['domain']['logging_no_trigger_permission'] = 1;
// Override the CMS root path defined by cmsRootPath.
// define('CIVICRM_CMSDIR', '/path/to/install/root/');
// Opt-out of announcements by the CiviCRM core team for releases, paid services, events, etc. Separate each preferred optout category with a comma:
// "offers": paid service offers
// "asks": requests for donations or membership signup/renewal to CiviCRM
// "releases": major release announcements
// "events": announcements of local/national upcoming events
// $civicrm_setting['domain']['communityMessagesUrl'] = 'https://alert.civicrm.org/alert?prot=1&ver={ver}&uf={uf}&sid={sid}&lang={lang}&co={co}&optout=offers,asks';
/**
* If you are using any CiviCRM script in the bin directory that
* requires authentication, then you also need to set this key.
* We recommend using a 16-32 bit alphanumeric/punctuation key.
* More info at http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration
*/
if (!defined('CIVICRM_SITE_KEY')) {
define( 'CIVICRM_SITE_KEY', 'vIrjjcml7wGdm6pE96g5yYTYVf6SujFnzMBfaiq6lM4');
}
/**
* Enable this constant, if you want to send your email through the smarty
* templating engine(allows you to do conditional and more complex logic)
*
*/
if (!defined('CIVICRM_MAIL_SMARTY')) {
define( 'CIVICRM_MAIL_SMARTY', 0 );
}
/**
* This setting logs all emails to a file. Useful for debugging any mail (or civimail) issues.
* Enabling this setting will not send any email, ensure this is commented out in production
* The CIVICRM_MAIL_LOG is a debug option which disables MTA (mail transport agent) interaction.
* You must disable CIVICRM_MAIL_LOG before CiviCRM will talk to your MTA.
*/
// if (!defined('CIVICRM_MAIL_LOG')) {
// define( 'CIVICRM_MAIL_LOG', '/Applications/MAMP/htdocs/d8civicrm.local/web/sites/default/files/civicrm/templates_c/mail.log');
// }
/**
* This setting will only work if CIVICRM_MAIL_LOG is defined. Mail will be logged and then sent.
*/
//if (!defined('CIVICRM_MAIL_LOG_AND_SEND')) {
// define( 'CIVICRM_MAIL_LOG_AND_SEND', 1);
//}
if (!defined('CIVICRM_DOMAIN_ID')) {
define( 'CIVICRM_DOMAIN_ID', 1);
}
/**
* Setting to define the environment in which this CiviCRM instance is running.
* Note the setting here must be value from the option group 'Environment',
* (see Administration > System Settings > Option Groups, Options beside Environment)
* which by default has three option values: 'Production', 'Staging', 'Development'.
* NB: defining a value for environment here prevents it from being set
* via the browser.
*/
// $civicrm_setting['domain']['environment'] = 'Production';
/**
* Settings to enable external caching using a cache server. This is an
* advanced feature, and you should read and understand the documentation
* before you turn it on. We cannot store these settings in the DB since the
* config could potentially also be cached and we need to avoid an infinite
* recursion scenario.
*
* @see http://civicrm.org/node/126
*/
/**
* If you have a cache server configured and want CiviCRM to make use of it,
* set the following constant. You should only set this once you have your cache
* server up and working, because CiviCRM will not start up if your server is
* unavailable on the host and port that you specify. By default CiviCRM will use
* an in-memory array cache
*
* To use the php extension memcache use a value of 'Memcache'
* To use the php extension memcached use a value of 'Memcached'
* To use the php extension apc use a value of 'APCcache'
* To use the php extension redis use a value of 'Redis'
* To not use any caching (not recommended), use a value of 'NoCache'
*
*/
if (!defined('CIVICRM_DB_CACHE_CLASS')) {
define('CIVICRM_DB_CACHE_CLASS', 'ArrayCache');
}
/**
* Change this to the IP address of your cache server if it is not on the
* same machine (Unix).
*/
if (!defined('CIVICRM_DB_CACHE_HOST')) {
define('CIVICRM_DB_CACHE_HOST', 'localhost');
}
/**
* Change this if you are not using the standard port for your cache server.
*
* The standard port for Memcache & APCCache is 11211. For Redis it is 6379.
*/
if (!defined('CIVICRM_DB_CACHE_PORT')) {
if (CIVICRM_DB_CACHE_CLASS === 'Redis') {
define('CIVICRM_DB_CACHE_PORT', 6379 );
}
else {
define('CIVICRM_DB_CACHE_PORT', 11211);
}
}
/**
* Change this if your cache server requires a password (currently only works
* with Redis)
*/
if (!defined('CIVICRM_DB_CACHE_PASSWORD')) {
define('CIVICRM_DB_CACHE_PASSWORD', '' );
}
/**
* Items in cache will expire after the number of seconds specified here.
* Default value is 3600 (i.e., after an hour)
*/
if (!defined('CIVICRM_DB_CACHE_TIMEOUT')) {
define('CIVICRM_DB_CACHE_TIMEOUT', 3600 );
}
/**
* If you are sharing the same cache instance with more than one CiviCRM
* database, you will need to set a different value for the following argument
* so that each copy of CiviCRM will not interfere with other copies. If you only
* have one copy of CiviCRM, you may leave this set to ''. A good value for
* this if you have two servers might be 'server1_' for the first server, and
* 'server2_' for the second server.
*/
if (!defined('CIVICRM_DB_CACHE_PREFIX')) {
define('CIVICRM_DB_CACHE_PREFIX', '');
}
/**
* The cache system traditionally allowed a wide range of cache-keys, but some
* cache-keys are prohibited by PSR-16.
*/
if (!defined('CIVICRM_PSR16_STRICT')) {
define('CIVICRM_PSR16_STRICT', FALSE);
}
/**
* If you have multilingual site and you are using the "inherit CMS language"
* configuration option, but wish to, for example, use fr_CA instead of the
* default fr_FR (for French), set one or more of the constants below to an
* appropriate regional value.
*/
// define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
// define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
// define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX');
// define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR');
// define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW');
/**
* Native gettext improves performance of localized CiviCRM installations
* significantly. However, your host must enable the locale (language).
* On most GNU/Linux, Unix or MacOSX systems, you may view them with
* the command line by typing: "locale -a".
*
* On Debian or Ubuntu, you may reconfigure locales with:
* # dpkg-reconfigure locales
*
* For more information:
* http://wiki.civicrm.org/confluence/x/YABFBQ
*/
// if (!defined('CIVICRM_GETTEXT_NATIVE')) {
// define('CIVICRM_GETTEXT_NATIVE', 1);
// }
/**
* Define how many times to retry a transaction when the DB hits a deadlock
* (ie. the database is locked by another transaction). This is an
* advanced setting intended for high-traffic databases & experienced developers/ admins.
*/
define('CIVICRM_DEADLOCK_RETRIES', 3);
/**
* Configure MySQL to throw more errors when encountering unusual SQL expressions.
*
* If undefined, the value is determined automatically. For CiviCRM tarballs, it defaults
* to FALSE; for SVN checkouts, it defaults to TRUE.
*/
// if (!defined('CIVICRM_MYSQL_STRICT')) {
// define('CIVICRM_MYSQL_STRICT', TRUE );
// }
/**
* Specify whether the CRM_Core_BAO_Cache should use the legacy
* direct-to-SQL-mode or the interim PSR-16 adapter.
*/
// define('CIVICRM_BAO_CACHE_ADAPTER', 'CRM_Core_BAO_Cache_Psr16');
if (CIVICRM_UF === 'UnitTests') {
if (!defined('CIVICRM_CONTAINER_CACHE')) define('CIVICRM_CONTAINER_CACHE', 'auto');
if (!defined('CIVICRM_MYSQL_STRICT')) define('CIVICRM_MYSQL_STRICT', true);
}
/**
*
* Do not change anything below this line. Keep as is
*
*/
$include_path = '.' . PATH_SEPARATOR .
$civicrm_root . PATH_SEPARATOR .
$civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR .
get_include_path( );
if ( set_include_path( $include_path ) === false ) {
echo "Could not set the include path<p>";
exit( );
}
if (!defined('CIVICRM_CLEANURL')) {
if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
define('CIVICRM_CLEANURL', 1 );
}
elseif ( function_exists('config_get') && config_get('system.core', 'clean_url') != 0) {
define('CIVICRM_CLEANURL', 1 );
}
elseif( function_exists('get_option') && get_option('permalink_structure') != '' ) {
define('CIVICRM_CLEANURL', 1 );
}
else {
define('CIVICRM_CLEANURL', 0);
}
}
// force PHP to auto-detect Mac line endings
ini_set('auto_detect_line_endings', '1');
// make sure the memory_limit is at least 64 MB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit = strtolower(substr($memLimitString, -1));
$memLimit = (int) $memLimitString;
switch ($memLimitUnit) {
case 'g': $memLimit *= 1024;
case 'm': $memLimit *= 1024;
case 'k': $memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 134217728) {
ini_set('memory_limit', '128M');
}
require_once 'CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();
```https://lab.civicrm.org/dev/core/-/issues/1855Allow different output formats for CiviReport results, like native excel form...2020-09-03T15:17:35ZDaveDAllow different output formats for CiviReport results, like native excel format, and untangle codeThis [started as a question](https://github.com/civicrm/civicrm-core/pull/17145) like "without having to patch core or adding another `if outputformat == 'x'` into some already awkward code in core, how can an extension implement a new o...This [started as a question](https://github.com/civicrm/civicrm-core/pull/17145) like "without having to patch core or adding another `if outputformat == 'x'` into some already awkward code in core, how can an extension implement a new output format for civireport results?"
My own motivation for this is a couple things:
1. I've had to look at the related code blocks more than once and it takes at least 15 minutes just to wade through and get to a point where you can start looking into what you were originally trying to look into. Then you get lost again while circling back.
1. I like the idea of being able to prevent people sending me listings of contacts in *pdf* format. No I will not import or analyze this data you've sent me in pdf format. (You can prevent this currently, it would just be easier after.)
1. The email body when sent by the mail_report job is hardcoded. There's been one or two requests to have it be more configurable. You can sort of do it with hook_alterMailParams now but it's not the most robust. I'm not fully addressing that here with any UI changes, but the proposed changes set the stage for it being easier to get there. At the very least you would now be able to write an extension that simply extends the existing handler class (e.g. csv) and overrides the small function that returns the text.
1. I'm currently doing this a different way and don't know if I would switch, but it opens up the possibility for an output handler that provides templates into which the data is inserted which then automatically is available in the existing UI and mail_report job. For most people this would mean a pdf template, but for people like me this means something like an excel template with a prebuilt pivot table and the handler would update the source rows so the pivot would automatically update.
And then beyond my own motivation some other possibilities which are theoretical:
1. A variation of the last point above would be an outputhandler where when run by mail_report it connects to another network service and sends the data there server-to-server. You could set this up via cron exactly the same way you normally use the mail_report job. The equivalent download would then still also be automatically available to users to do manually the same as any other civireport.
## So...
After doing some investigating, can summarize how the current output code works as
* type `sendmail`, which gets the output as a string and sends an email, OR
* type `not sendmail`, which starts a download. Note that "download" technically is also a string, but sent to the browser instead of used in an email.
Then further
* Some of the convoluted nature of the existing code is partly because how to get either of those is different depending on the output format (e.g. csv/pdf/etc).
* Also note that "download" for type 'print' is actually the same as other downloads it's just that you don't need to change http headers first. So that's also adding to the awkwardness a bit in the current code because the way it's written it almost seems like a different code path.
**THEREFORE --->**: My thinking is to start on this by having a common interface to get the string. I mean interface in the general sense of the word, not necessarily OO Interface but maybe. But **then it reduces the number of if/else's to just one**:
* If sendmail,
* Get string (delegated to the output handler).
* Send email (for now extract this to its own function just for readability).
* Else
* Delegate to output handler to set headers and send string to browser (aka download).
There's a little more to it, and it can borrow a bit from the existing PRs, but that's what I'm thinking in terms of first steps to untangling. I will work on a PR.
Then the next steps after that would be to allow for other output handlers, whether it be by a new hook or existing hook or other.
#### Misc notes
* save/copy/delete are handled in beginPostProcess and do nothing in endPostProcess
* there's a difference between compileContent() and the output content. compileContent() is not used for csv, but is used for pdf and 'print'.
* endPostProcess has 4 different "categories":
1. "add contacts to group", which doesn't output anything
2. _sendmail, which uses the other output handlers but requests the results as a string.
* defaults to print, but also does csv or pdf and then exits
* There is also some hardcoding of the email body, partly because it includes a computed url, but it would be nice not to hardcode this.
* Note pdf is called with TRUE for 3rd param, so that it returns the pdf as a string.
3. Download, which uses the other output handlers but requests the results as a download.
* Note that print is a download technically, it just goes to the browser window. Csv or pdf starts an attachment download.
* Here pdf is the default, but at the point in the code where that happens it has to be either print or pdf and print would have been already handled.
* Note pdf is called with FALSE for 3rd param.
* csv is done by a wrapper around the same function that is used in _sendmail
4. Tests that extend CiviReportTestCase use _resultSet/getResultSet() and have _outputMode blank, so endPostProcess (which gets called from preProcess because force=1 here) does none of the above and just stores the results in an array.5.29.0https://lab.civicrm.org/dev/core/-/issues/1854Bug When Restoring Overridden Status on Related Memberships2023-04-29T05:03:20ZCamilo RodríguezBug When Restoring Overridden Status on Related MembershipsOverview
----------------------------------------
Under certain special circumstances, once a main membership that has related memberships (eg. a membership held by an employer for a maximum number of employees), if the status is overrid...Overview
----------------------------------------
Under certain special circumstances, once a main membership that has related memberships (eg. a membership held by an employer for a maximum number of employees), if the status is overridden for a specific date, and the date has been met so that status for the main membership and its related memberships can now be calculated by the membership status calculation job, some of the related memberships may get deleted.
Reproduction steps
----------------------------------------
The specific conditions that need to be met are:
- Have an organization with a membership that has a maximum number of related memberships via a specific relationship (eg. 3 maximum related contacts with employee relationship).
- Have more contacts related to the organization that the maximum related memberships (eg 5)
- Distribute the memberships to the contacts so that the first created contact, and the last contacts have the related memberships.
- Give the main membership an overridden status for a date in the past.
Run membership status calculation job.
Current behaviour
----------------------------------------
Under this conditions, when the job is run, what will happen is the 3 memberships will be allocated to the first 3 contacts related to the organization. So if before the job was run, we had contacts with ID's 1001, 1002, 1003, 1004, 1005, and the three memberships were for contacts 1001, 1004 and 1005, when the job runs, the memberships will be given to contacts 1001, 1002 and 1003, and the memberships for 1004 and 1005 will be deleted. Furthermore, a fatal exception is thrown when the job is run.
![image](/uploads/ed7b1709c19662a72108c32591dd9ccb/image.png)
Expected behaviour
----------------------------------------
- Running the job should maintain the memberships to the contacts they've already been given to.
- The job should run and complete without failure.
Environment information
----------------------------------------
* __CiviCRM: 5.24.6
* __PHP: 7.2
* __CMS: Drupal 7.71
* __Database: MySQL 5.7
* __Web Server: Nginx
Comments
----------------------------------------
I have debugged the issue and found a fix. I will add the PR to the ticket once I have it up.https://lab.civicrm.org/dev/core/-/issues/1853Can't remove subtype if any required custom field is based on it2020-07-09T21:47:11ZsamuelsovCan't remove subtype if any required custom field is based on itTo reproduce :
- create a sub-type
- add custom group on the sub-type
- add custom field in this custom group that are required
- create a contact with the new sub-type and fill-in the required fields, submit
- try to remove the sub-type...To reproduce :
- create a sub-type
- add custom group on the sub-type
- add custom field in this custom group that are required
- create a contact with the new sub-type and fill-in the required fields, submit
- try to remove the sub-type and submit -> the form validation gives "required field" errors
![Peek_02-07-2020_11-27](/uploads/613b34e5a07102a8703c0ebc2fc8060a/Peek_02-07-2020_11-27.gif)https://lab.civicrm.org/dev/core/-/issues/1852The multi-lingual multi-domain problem2023-05-05T05:03:20ZcolemanwThe multi-lingual multi-domain problemBackground
-------
- In a multi-lingual install, the schema is changed to add columns for all translatable fields.
- One column is added per language.
- The list of languages is stored in `civicrm_domain.locales`
- For unknown historical...Background
-------
- In a multi-lingual install, the schema is changed to add columns for all translatable fields.
- One column is added per language.
- The list of languages is stored in `civicrm_domain.locales`
- For unknown historical reasons, `locales` was only populated for domain 1. It was thus treated as a "master domain" although there doesn't appear to be any documentation of this.
- So in a multi-domain setup, domain 2 would inherit its language settings from domain 1.
Problem
-------
- Having `civicrm_domain.locales` be populated for domain 1 but `null` for domain 2+ is confusing to devs and leads to crashes when relying on that value from the current domain.
- Bug reported in #1800
Proposed solution
-------
1. Ensure all domains have `locales` populated when enabling multilingual: https://github.com/civicrm/civicrm-core/pull/17733
2. An upgrade script to ensure `locales` is the same for all domains: https://github.com/civicrm/civicrm-core/pull/17738
Related issues/PRs
--------
- https://github.com/civicrm/civicrm-core/pull/17646
- https://github.com/civicrm/civicrm-core/pull/17733
- https://github.com/civicrm/civicrm-core/pull/17650
Tough questions
----------
Once the relatively easy stuff is solved by merging the fixes above, we might consider:
1. What happens if the admin desires one domain to be single-language and another to be multi?
2. When reverting from multi-lingual back to single, are all domains affected?
3. What if different multi-lingual domains want to support different languages?
4. Is all of the above completely unreasonable and multilingual settings should just always be the same across domains?https://lab.civicrm.org/dev/core/-/issues/1851State/Province Multi-select fails to save values2020-07-02T17:20:52ZhaystackState/Province Multi-select fails to save valuesOverview
----------------------------------------
A Custom Field of type State/Province Multi-select fails to save values when attached to an Event and "Is this Field Searchable?" is set to `false`. Reproduced on WPMaster and DMaster dem...Overview
----------------------------------------
A Custom Field of type State/Province Multi-select fails to save values when attached to an Event and "Is this Field Searchable?" is set to `false`. Reproduced on WPMaster and DMaster demo sites for a CiviEvent. I haven't checked if this is exclusive to Events, but can see the solution and will open a PR in due course.
Reproduction steps
----------------------------------------
1. Create a set of Custom Fields and attach to to "Event"
1. Add a field of data type "State/Province" and field type "Select State/Province"
1. Enable "Multi-Select" and disable "Is this Field Searchable?"
1. Visit a "Configure Event" page and select some "State/Province" values
1. Submit the form to save the event - State/Province" values are saved
1. Submit the form again to save the event - State/Province" values are lost
Current behaviour
----------------------------------------
Following the above procedure (line refs are for 5.26.2) throws the following warnings:
```
[02-Jul-2020 12:59:29 Europe/London] PHP Warning: explode() expects parameter 2 to be string, array given in /path/to/CRM/Core/BAO/CustomGroup.php on line 1383
[02-Jul-2020 12:59:29 Europe/London] PHP Warning: Invalid argument supplied for foreach() in /path/to/CRM/Core/BAO/CustomGroup.php on line 1384
```
The WPMaster and DMaster logs will show similar entries.
Expected behaviour
----------------------------------------
The incoming data should be parsed in the same way that [this commit](https://github.com/civicrm/civicrm-core/commit/fb56e9640b4380f2f76b72da2031d37e67165045#diff-d9f1be3fcfd7cea0a4864a21997c258aR1384-R1390) implements. Doing so fixes the problem.haystackhaystackhttps://lab.civicrm.org/dev/core/-/issues/1850Boot API/protocol for third-party modules should be upgrade-safe2023-04-14T05:03:25ZtottenBoot API/protocol for third-party modules should be upgrade-safeOverview
----------------------------------------
This is a generalized response to https://lab.civicrm.org/dev/core/-/issues/1846. 1846 is specific example (re:5.27 and woocommerce) of a class of a bug which has arisen with different v...Overview
----------------------------------------
This is a generalized response to https://lab.civicrm.org/dev/core/-/issues/1846. 1846 is specific example (re:5.27 and woocommerce) of a class of a bug which has arisen with different versions and different modules over the years.
Example use-case
----------------------------------------
1. Install CiviCRM version `$x`
2. Install a CMS plugin or module which uses CiviCRM (*In the above report, it was WooCommerce. In other reports, it's been Drupal Views. But it could be others.*)
3. Configure the plugin or module in a way that is pervasive on the system. (*Ex: It adds a block in the left-hand bar on every page, or it performs some logic whenever a user logs in, or it adds records to global menu/cache/data-structure.*)
4. Download the new code for CiviCRM version `$x+1`
5. Open the CMS/Civi web UI
6. Navigate to Civi's DB upgrade screen
The key issue for this use-case comes in at step 5. The plugin or module is active, and it is pervasive, and it needs to use Civi APIs. It probably calls `civicrm_initialize()` and then calls some service or data from Civi. But, we're in the middle of an upgrade process; the schema is out-of-date; even if you call `civicrm_initialize()`, one cannot guarantee that the system is actually working.
Current approach
----------------------------------------
The behavior depends on the details of the versions (`$x` vs `$x+1`) and of the customization. In many cases, things work fine - there's no pervasive customization, or the old+new DB schemas are "close enough".
But *sometimes* there are problems. This would be reported as an upgrade bug. ("I downloaded the latest version, and I can't run the upgrade, and things are crashy.") It cannot be reproduced in a clean environment - you have to install a customization and configure it suitably. Historically, the process has been like:
1. Attempt the upgrade on a real/complex site
2. Discover the problem
3. Either:
1. Identify and disable the customization; re-attempt the upgrade; re-enable the customization.
2. Report the issue; patch `civicrm-core` with a narrow work-around; and issue a point-release.
Either way, this is a reactive posture that leaves us systemically vulnerable to this class of issue and creates a poor impression. The key drivers (e.g. the list of third-party plugins; the list of upgrades; etc) are all open-ended. There is no simple, realistic, long-term verification protocol.
Analysis
----------------------------------------
For any module/plugin which needs to bootstrap Civi (e.g. `civicrm_initialize()`), there should be an explicit check/indication of whether Civi is in a working state.
As an example, suppose we have a Drupal module:
```php
// Show a block with a horosocope based on the logged-in user's date of birth
function horoscope_block_view($delta) {
if ($delta === 1) {
civicrm_intitialize();
$dob = civicrm_api3('Contact', 'getvalue', ['id' => '@user_contact_id', 'return' => 'birth_date']);
$msg = horoscope_lookup($dob);
return ['subject' => t('Horoscope'), 'content' => htmlentities($msg)];
}
}
```
I would submit that the problem here revolves around the contract for `civicrm_initialize()` - this caller has assumed that the post-condition of `civicrm_initialize()` is... to have an initialized Civi. But, if we're working toward a DB upgrade, then that condition cannot be met.
Proposed behavior
----------------------------------------
The correct thing is for this block to fail gracefully, e.g.
```php
// Show a block with a horosocope based on the logged-in user's date of birth
function horoscope_block_view($delta) {
if ($delta === 1) {
if (civicrm_intitialize() === 'partial') {
return ['subject' => t('Horoscope'), 'content' => t('We are having trouble communing with the astral spirits. Please upgrade Civi and come back later.')];
}
$dob = civicrm_api3('Contact', 'getvalue', ['id' => '@user_contact_id', 'return' => 'birth_date']);
$msg = horoscope_lookup($dob);
return ['subject' => t('Horoscope'), 'content' => htmlentities($msg)];
}
}
```
For this to work, Civi's side of the boot protocol has to provide information about how well it has booted. Here's a possible contract (*this is an incremental revision of the current; but it's possible something else is better*):
```php
/**
* @return bool|string
* FALSE: Indicates that Civi is not booted at all. For example, this may happen if it hasn't been installed.
* TRUE: Indicates that Civi is fully booted. You should expect most services to work.
* 'partial': Indicates that Civi may not be fully available. Most "application" should gracefully fail.
* However, some cases (eg `drush civicrm-upgrade-db`) might still continue with execution.
*/
function civicrm_initialize();
```
Comments
-----------
Addressing this would involve a few steps/phases:
1. Implement the updated boot protocol (e.g. patch `civicrm_initialize()`)
2. Update any bundled / widely-used / semi-official modules to be compliant
3. Update dev docs
4. Encourage other downstream authors to follow the protocolhttps://lab.civicrm.org/dev/core/-/issues/1849Smart Group search criteria cannot be saved if the pre-existing Smart Group s...2020-09-17T09:46:10Zjustinfreeman (Agileware)Smart Group search criteria cannot be saved if the pre-existing Smart Group search criteria returns no resultsSmart Group search criteria cannot be saved if the pre-existing Smart Group search criteria returns no results.
This is increasingly common since CiviCRM will now warn users about disabled/deleted custom fields and the related Smart Gro...Smart Group search criteria cannot be saved if the pre-existing Smart Group search criteria returns no results.
This is increasingly common since CiviCRM will now warn users about disabled/deleted custom fields and the related Smart Group that need to be updated. The user is then stuck and unable to action the warning notice displayed by CiviCRM.
![chrome_aphUhSKcqb](/uploads/8c9ec177e1eacbb9ca6183e1e15beb2f/chrome_aphUhSKcqb.png)
A workaround to the problem is to manually add a contact to the Smart Group and then the ability to update the Smart Group via Actions becomes available. Or to change the search criteria so that it does return results - even if those results do not match the purpose of the Smart Group. These workarounds are not obvious to end-users.
It would be preferable for the action to update the Smart Group criteria was available even if no search results were returned by the current search, allowing the user to save the search criteria. This gives the future ability for contacts that match the search criteria to populate the group.
![chrome_DIjHo5MOpZ](/uploads/fac7cbc7901cf1088ed9f3adb98ca860/chrome_DIjHo5MOpZ.png)
Relates to https://lab.civicrm.org/dev/core/-/issues/1471
Agileware Ref: CIVICRM-1509https://lab.civicrm.org/dev/core/-/issues/1848Importing subtype-specific data to existing contacts loses their other subtypes2023-03-30T11:33:47ZAndrew WestImporting subtype-specific data to existing contacts loses their other subtypesI just tried to import subtype-specific data for existing contacts, and their other subtypes went away. To recreate on demo:
1. Find a contact and set them to the 'Student' contact type
2. Note their contact ID
3. Find a custom field in...I just tried to import subtype-specific data for existing contacts, and their other subtypes went away. To recreate on demo:
1. Find a contact and set them to the 'Student' contact type
2. Note their contact ID
3. Find a custom field in a different subtype and pick a random value. Demo currently has 'Camera Skill Level' on the 'Volunteer', with possible values 1-5
4. Create a CSV with an ID column and a Camera Skill level column:
![Annotation_2020-07-01_185424](/uploads/974250d6b8ade278011a2602ebb18f00/Annotation_2020-07-01_185424.png)
5. Import this CSV, setting Subtype to 'Volunteer', and 'Update'
![Annotation_2020-07-01_184535](/uploads/37f1551623f0a2c5e1cd0aedc27e7027/Annotation_2020-07-01_184535.png)
6. Map the fields appropriately:
![Annotation_2020-07-01_184635](/uploads/8cebdc8c99a7db9a3f199369e59560e1/Annotation_2020-07-01_184635.png)
7. Check the original contact - they are now marked as 'Volunteer' and no longer Student.
This happens no matter whether the contact has the subtype originally - ie. if you are importing data with the purpose of inherently adding this subtype, or if it's already there.https://lab.civicrm.org/dev/core/-/issues/1847Offset is not respected in Date Preferences2020-07-15T00:47:07ZyashodhaOffset is not respected in Date PreferencesSteps to replicate :
- Navigate to Administer > Customize Data and Screens > Date Preferences
- Changed searchDate Start offset from 20 to 50:
![pref](/uploads/96847ace7528adc16ad37a7ad42692ed/pref.png)
The change had no affect on the...Steps to replicate :
- Navigate to Administer > Customize Data and Screens > Date Preferences
- Changed searchDate Start offset from 20 to 50:
![pref](/uploads/96847ace7528adc16ad37a7ad42692ed/pref.png)
The change had no affect on the range of years offered in search forms (i.e. there is only a 20 year range available 2010 - 2030)
![search](/uploads/a0fccd9f6e91c643a4bf755289a6e7e3/search.png)5.27.2https://lab.civicrm.org/dev/core/-/issues/1846Upgrading to 5.27 hits fatal errors getting to the upgrade screen2020-08-20T10:34:20ZeileenUpgrading to 5.27 hits fatal errors getting to the upgrade screenIn deploying the rc on a wordpress site just now I hit 3 places where DB queries failed before I could get to the upgrade screen (through the UI). One of these brought down the Wordpress site (a woo_commerce-civi api call) The problem i...In deploying the rc on a wordpress site just now I hit 3 places where DB queries failed before I could get to the upgrade screen (through the UI). One of these brought down the Wordpress site (a woo_commerce-civi api call) The problem is the new field civicrm_custom_field.serialize gets included in queries before it is in th DB
This patch got me there https://github.com/civicrm/civicrm-core/pull/17722 but drupal views is likely also an issue5.27.1https://lab.civicrm.org/dev/core/-/issues/1845civicrm_saved_search FK in civicrm_group should be ON DELETE CACSCADE2021-04-15T22:11:29ZMichael McAndrewcivicrm_saved_search FK in civicrm_group should be ON DELETE CACSCADEThe foreign key in civicrm_group
```
CONSTRAINT `FK_civicrm_group_saved_search_id` FOREIGN KEY (`saved_search_id`) REFERENCES `civicrm_saved_search` (`id`) ON DELETE SET NULL
```
is `ON DELETE SET NULL` which assumes that there is a us...The foreign key in civicrm_group
```
CONSTRAINT `FK_civicrm_group_saved_search_id` FOREIGN KEY (`saved_search_id`) REFERENCES `civicrm_saved_search` (`id`) ON DELETE SET NULL
```
is `ON DELETE SET NULL` which assumes that there is a use for a saved search that was linked to a group even when that group is deleted. I don't think this is the case. I think it should be `ON DELETE CACSCADE`.
Does this seem reasonable to people? If people agree, I can add a couple of lines to the upgrade script.
I came across this while investigating the following warning: [![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/JKouq.png5.37.0https://lab.civicrm.org/dev/core/-/issues/1844Noncompliant query leads to (semi-)random sorting and failing unit test CRM_C...2023-04-24T05:03:24ZDaveDNoncompliant query leads to (semi-)random sorting and failing unit test CRM_Case_BAO_CaseTest::testSortByCaseContactThis doesn't seem to come up on any commonly used screens but something has changed recently, either in mysql on the test sites or somewhere else, that is exposing a problem that has always been there in the query described at https://gi...This doesn't seem to come up on any commonly used screens but something has changed recently, either in mysql on the test sites or somewhere else, that is exposing a problem that has always been there in the query described at https://github.com/civicrm/civicrm-core/pull/17702#issuecomment-650777728 with regards to full-groupby. See also https://github.com/civicrm/civicrm-core/pull/17705.
At the moment it just seems to be causing CRM_Case_BAO_CaseTest::testSortByCaseContact to fail on every PR. I did some r-runs on one of the recent test sites for case dashboard/dashlet/find cases etc, and didn't see any (new) problems.https://lab.civicrm.org/dev/core/-/issues/1843Url-tracking in mass sms2020-08-03T00:07:11ZdmunioUrl-tracking in mass smsOverview
----------------------------------------
If a mass sms is sent with a url in the message, when sending the sms a url-tracking is added. This affects the length of the sms and also, there are no sms tracking reports.
Reproductio...Overview
----------------------------------------
If a mass sms is sent with a url in the message, when sending the sms a url-tracking is added. This affects the length of the sms and also, there are no sms tracking reports.
Reproduction steps
----------------------------------------
1. New mass sms
2. Add url in the sms message.
3. Preview sms with url-tracking
![image](/uploads/8124f67212f608522c7b260185fa306b/image.png)5.29.0https://lab.civicrm.org/dev/core/-/issues/1842Brief Description of Work Done during First Month of GSoC Project- Probots an...2022-06-24T03:30:58Zkartik1000Brief Description of Work Done during First Month of GSoC Project- Probots and GitLab to GitHub IntegrationHey All, I am Kartik and I had been selected for the GSoC Project Probots and Gitlab to GitHub Integration and so far I have completed 1 month of this project out of 3 months and I would like to share with the CiviCRM Community of the wo...Hey All, I am Kartik and I had been selected for the GSoC Project Probots and Gitlab to GitHub Integration and so far I have completed 1 month of this project out of 3 months and I would like to share with the CiviCRM Community of the work-done during this project. For more info. regarding project details, you can refer here https://civicrm.org/blog/kartik1000/gsoc-project-probots-and-gitlab-github-integration.
So, to begin with, one of the issues I faced, in the beginning, was how to test the working of the civi-bot that already exists in civi-core by adding more code to it related to issues I aimed to solve. So, with much discussion with @eileen and Saurabh, we decided to create a dev-bot from the forked repo of [probot-civicrm](https://github.com/civicrm/probot-civicrm) and use it for our purposes of testing. The code-repo for the same bot is present [here](https://github.com/kartik1000/civicrmdev-bot) with different issues I solved existing as different merged branches. Another issue I faced in setting up the dev-bot was hosting the bot. For the bot to be active always, we need to host it as a node-js application, the most suitable option for which are Heroku and glitch. For the simplicity of the glitch, I decided to use it for my purpose. The other issue that I faced was to keep the bot always active for that either one can use the ping method every 5 minutes or use the service of [uptime robot](https://uptimerobot.com/).
- The first issue I decided to complete was to make sure that we issue newcomer's message and information only to the new contributor and not keep posting the same message to every contributor. For this, I added simple logic of checking how many PRs have been made by the contributor, if the count is 1 then issue newcomer's message. It just required to fetch this information using the existing GitHub APIs. For the same reasons, I had to modify our existing template as well. The reviewing standards will be posted on every PR irrespective of it being a new contributor or not.
![Screenshot_2020-06-26_at_5.22.20_PM](/uploads/4f509c7f5511a91509d58084ba5fbb16/Screenshot_2020-06-26_at_5.22.20_PM.png)
This is an example of how a PR created by a new contributor looks like after making the required changes.
- The second issue I worked on is to merge the existing [stale-bot](https://probot.github.io/apps/stale/) with the existing civi-bot. Stale-bot closes PRs and issues which have been inactive for some time. It first labels PR as stale/wontfix and then after some-time, if the PR is still in-active then it closes the PR. This task was not too difficult as well since the entire open-source repo for the stale-bot already exists but since it is old many of its functions were depreciated and needed to be updated from the GitHub APIs and few other modifications were required. So, this task was also accomplished and tested as well.
![Screenshot_2020-06-26_at_5.36.20_PM](/uploads/05ecaa068e50f2e0ed89e43ddb68e81b/Screenshot_2020-06-26_at_5.36.20_PM.png)![Screenshot_2020-06-26_at_5.36.38_PM](/uploads/33aa7124ae2fd7757fa49cc723564f20/Screenshot_2020-06-26_at_5.36.38_PM.png)
Till now I have learnt a lot of new things from this project especially how powerful the GitHub APIs are which allow the user to receive almost any information regarding their repository. In the upcoming months, I hope to learn even more new things.
The entire code for the civicrmdev-bot is present in this [repository](https://github.com/kartik1000/civicrmdev-bot).
We plan to merge these features in the existing civi-bot in some time so that they can be used in CiviCRM-core.
I request to all the community members if you have any ideas or thoughts on what other things I can do to automate our workflow during the remaining project, please comment them on this issue and thanks to all!https://lab.civicrm.org/dev/core/-/issues/1841[regression] Attempting to access Multi-Record Custom Field import results in...2020-07-01T02:11:20ZJonGold[regression] Attempting to access Multi-Record Custom Field import results in crash## To replicate
* You must start with a site where you've never visited this screen before (a demo site works well).
* Go to **Contacts » Import Contacts**.
* Click the **help** icon in the instructions (see screenshot item 1)
* Click th...## To replicate
* You must start with a site where you've never visited this screen before (a demo site works well).
* Go to **Contacts » Import Contacts**.
* Click the **help** icon in the instructions (see screenshot item 1)
* Click the **more** link in the help to access the Import Multi-Record Custom Value screen (see screenshot item 2).
![Selection_947](/uploads/95b8fb2da66f267362c4600bf6fa900d/Selection_947.png)
## Observed Result
An exception: `'Import Multi value custom data' is not a valid option for field mapping_type_id`.
## Expected result
The page loads.
## Notes
I believe this is a variant of the regression fixed in #1816. When translating a pseudoconstant to an ID when passing an API param, we now check the string against the `name` and not the `label`. This makes good sense, but `CRM_Core_BAO_Mapping::getCreateMappingValues()` creates the "Import Multi value custom data" Mapping record with a label that doesn't match the name - so a function that previously looked up the label is crashing with the exception above.
I solve this by explicitly setting the `name` field. Much as I'd like to have solved this by changing the search criteria, it's constructed programmatically in a way that would require a change to all the `name`s of existing Mapping Type option values, since they have spaces in them (boo!). This is the much safer fix.
Also, testing this only required one line of code! :)
## Backtrace
```
#0 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php(105): civicrm_api3("Mapping", "get", (Array:4))
#1 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php(157): CRM_Core_BAO_Mapping::getMappings("Import Multi value custom data")
#2 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Import/Form/DataSource.php(66): CRM_Core_BAO_Mapping::getCreateMappingValues("Import Multi value custom data")
#3 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Custom/Import/Form/DataSource.php(54): CRM_Import_Form_DataSource->buildQuickForm()
#4 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php(609): CRM_Custom_Import_Form_DataSource->buildQuickForm()
#5 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#6 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Custom_Import_Form_DataSource), "display")
#7 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Custom_Import_Form_DataSource), "display")
#8 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("display")
#9 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
#10 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#11 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#12 /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
#13 /home/jon/local/civicrm-buildkit/build/dmaster/web/includes/menu.inc(527): civicrm_invoke("import", "custom")
#14 /home/jon/local/civicrm-buildkit/build/dmaster/web/index.php(21): menu_execute_active_handler()
#15 {main}
```5.27.0JonGoldJonGold