Development issueshttps://lab.civicrm.org/groups/dev/-/issues2022-10-21T07:36:28Zhttps://lab.civicrm.org/dev/backdrop/-/issues/65install error CiviCRM 5.36.1 on BACKDROP 1.83 via MAMP 6.3 PHP 7.4.122022-10-21T07:36:28Zbgminstall error CiviCRM 5.36.1 on BACKDROP 1.83 via MAMP 6.3 PHP 7.4.12*Created by: punkyard*
Hi, after first and fresh install of backdrop, i copied CiviCRM folder in modules
no error during set up
but: no page will be displayed (SAFARI and EPIC (chrome-like) macos 10.14.6) except the admin page
"
Page no...*Created by: punkyard*
Hi, after first and fresh install of backdrop, i copied CiviCRM folder in modules
no error during set up
but: no page will be displayed (SAFARI and EPIC (chrome-like) macos 10.14.6) except the admin page
"
Page non trouvée
Ajouter une redirection d'URL de cette page vers un autre emplacement
Vous êtes ici : Accueil
La page demandée "/backdrop183/backdrop183/civicrm/a/" n'a pas pu être trouvée.
"
I found in line 234 that the root folder is doubled :
if (!defined('CIVICRM_UF_BASEURL')) {
define( 'CIVICRM_UF_BASEURL' , 'https://domain.net/bkd/bkd'); <<< here bkd/bkd, instead of just one bkd, (domain.net/bkd/)
I'm posting this issue on the advice of @laryn, from Mattermost forumhttps://lab.civicrm.org/dev/backdrop/-/issues/63Source files location should not include "sites/all" for Backdrop2022-10-21T07:36:41ZbgmSource files location should not include "sites/all" for Backdrop*Created by: jenlampton*
I am trying to get Civi installed on Backdrop and just ran into the problem of the `cv` command looking for the civi module in `sites/all/modules` but in backdrop the contrib modules are located in `modules` unl...*Created by: jenlampton*
I am trying to get Civi installed on Backdrop and just ran into the problem of the `cv` command looking for the civi module in `sites/all/modules` but in backdrop the contrib modules are located in `modules` unless it is a multi-site installation. Is there a way for the backdrop version to add an additional location to the places the installer checks for civi?
(and should this request belong in the cv queue, or is this the correct loaction?)https://lab.civicrm.org/dev/backdrop/-/issues/54drush ci load_generated_data always true if flag present2022-10-21T07:38:27Zbgmdrush ci load_generated_data always true if flag present*Created by: tabroughton*
When reading the description for the civicrm-install drush command the flag load_generated_data is stated to default to FALSE - this suggests that setting the flag to TRUE will generate the data (and it does).
...*Created by: tabroughton*
When reading the description for the civicrm-install drush command the flag load_generated_data is stated to default to FALSE - this suggests that setting the flag to TRUE will generate the data (and it does).
However, setting any value against load_generated_data will also load the data, in fact just having the flag present when running the command will generate the data. This isn't terrible but it doesn't match the other flag settings which all accept a value. Also the description suggests setting the value to FALSE would not load the data but it does.
I suggest being able to set true or false explicitly (where false is default if not present) would be the better solution here.https://lab.civicrm.org/dev/backdrop/-/issues/49installing via composer2022-10-21T07:38:47Zbgminstalling via composer*Created by: tabroughton*
I'm trying to automate an installation of civicrm into backdrop and I'm using composer for all my other php libraries and frameworks. I see civicrm-core is available in [packagist](https://packagist.org/packag...*Created by: tabroughton*
I'm trying to automate an installation of civicrm into backdrop and I'm using composer for all my other php libraries and frameworks. I see civicrm-core is available in [packagist](https://packagist.org/packages/civicrm/civicrm-core) but no backdrop version.
What's the best way to do this please?https://lab.civicrm.org/dev/backdrop/-/issues/46CMS database integration code incorrect?2022-10-21T07:39:02ZbgmCMS database integration code incorrect?*Created by: laryn*
The code generated in the CMS database integration section is as follows:
> $database_prefix = array(
'default' => '',
I was having some trouble getting this working on a new site and after some time ended up com...*Created by: laryn*
The code generated in the CMS database integration section is as follows:
> $database_prefix = array(
'default' => '',
I was having some trouble getting this working on a new site and after some time ended up comparing to an older site that I set this up on previously, which has this format:
> $databases['default']['default']['prefix']= array(
'default' => '',
Once I changed that format, the Views integration started working for me.
I'm not sure if that changed recently or if I just figured out the needed changes earlier and forgot to file a ticket... but should we update that code to the other format, or is the existing code working for others?https://lab.civicrm.org/dev/backdrop/-/issues/45civicrm.config.php cannot find settings when multisite is enabled2022-10-21T07:39:16Zbgmcivicrm.config.php cannot find settings when multisite is enabled*Created by: jonhalle*
I was having a problem that extern.php could not locate civicrm.config.php
Looking at civicrm.config.php.backdrop it contains a mechanism to find civicrm.settings.php in a multisite setup.
```
// Alias could b...*Created by: jonhalle*
I was having a problem that extern.php could not locate civicrm.config.php
Looking at civicrm.config.php.backdrop it contains a mechanism to find civicrm.settings.php in a multisite setup.
```
// Alias could be defined in sites/sites.php
if (file_exists($confdir . "/sites.php")) {
include $confdir . "/sites.php";
}
```
but it has a minor error - as the comment says, the sites.php is located in the sites subdirectory so looking for it in the $confdir does not work.
A really ugly workaround is to create a couple of symlinks from the backdrop root directory to the sites subdirectory
```
ln -s sites/sites.php sites.php
ln -s sites/my-site-name my-site-name
```
Alternatively the code ought to say:
```
// Alias could be defined in sites/sites.php
if (file_exists($confdir . "sites/sites.php")) {
include $confdir . "sites/sites.php";
}
```
This also requires a change later in the file to again explicitly add the 'sites' dir with a
```
if (isset($sites[$dir]) && file_exists($confdir.'sites/'."{$sites[$dir]}/civicrm.settings.php")) {
$conf = $confdir.'sites/'."{$sites[$dir]}";
return $conf;
}
```
Looks like the D7 code also needs a change here as I think Drupal 7 and Backdrop define sites in the same place.
The code in question goes back to 2015:
https://github.com/civicrm/civicrm-drupal/pull/327/files#diff-2052e8c39d1751b7d68bc909f7962cb7
Presumably it worked then on Drupal - possibly only on sites with symlinks in place as described above. Very possibly not many people use Backdrop or Drupal in multisite mode with CiviCRM, which might be why this has not been an issue for others.https://lab.civicrm.org/dev/backdrop/-/issues/41Clean URLs not working for civicrm after install in lando - works for backdro...2022-10-25T11:44:56ZbgmClean URLs not working for civicrm after install in lando - works for backdrop routes*Created by: ttrezren*
[I opened an issue on lando](https://github.com/lando/lando/issues/1546), though it may not be a lando bug. Visiting /civicrm after a successful backdrop and civicrm install, I get 404 not found. Same on any civic...*Created by: ttrezren*
[I opened an issue on lando](https://github.com/lando/lando/issues/1546), though it may not be a lando bug. Visiting /civicrm after a successful backdrop and civicrm install, I get 404 not found. Same on any civicrm pages. Backdrop pages work fine. Civicrm works if I turn off clean URLs.https://lab.civicrm.org/dev/backdrop/-/issues/37Warnings when using Webform CiviCRM with "Checkboxes (live)" widget2022-10-24T21:33:01ZbgmWarnings when using Webform CiviCRM with "Checkboxes (live)" widget*Created by: laryn*
Follow-up issue from https://github.com/civicrm/civicrm-backdrop/issues/55
When testing `webform_registration`, I see these in the log (the pair of warnings is in there twice, actually):
`Warning: array_keys() expe...*Created by: laryn*
Follow-up issue from https://github.com/civicrm/civicrm-backdrop/issues/55
When testing `webform_registration`, I see these in the log (the pair of warnings is in there twice, actually):
`Warning: array_keys() expects parameter 1 to be array, string given in CRM_Core_BAO_CustomGroup::postProcess() (line 1539 of /path/modules/civicrm/CRM/Core/BAO/CustomGroup.php).`
`Warning: implode(): Invalid arguments passed in CRM_Core_BAO_CustomGroup::postProcess() (line 1541 of /path/modules/civicrm/CRM/Core/BAO/CustomGroup.php).`https://lab.civicrm.org/dev/backdrop/-/issues/32Ensure drush works with Backdrop version of drush2022-10-25T11:45:12ZherbdoolEnsure drush works with Backdrop version of drushhttps://lab.civicrm.org/dev/core/-/issues/3900Proposal: Check mailings for fixed personalization (without tokens) before su...2022-10-25T11:46:58ZlarsssandergreenProposal: Check mailings for fixed personalization (without tokens) before submittingSometimes, people copy a link that was personalized to them with cid and cs and insert it into a mailing (i.e. with their contact ID and checksum instead of the appropriate tokens), then they send out a personalized link for their contac...Sometimes, people copy a link that was personalized to them with cid and cs and insert it into a mailing (i.e. with their contact ID and checksum instead of the appropriate tokens), then they send out a personalized link for their contact to a large group of people.
In order to prevent this, we could check for URLs that include something in the form of a checksum plus cid=integer or cid1=integer (this will support Webform CiviCRM too). Optionally, we could even validate the checksum, but that seems overkill. I think this would make the most sense at submission time, to keep things simple with Mosaico and Traditional mailings.
I'm not sure what the best way to handle the UI for this is. An error that prevents sending seems too strong, but just a warning while still submitting seems too weak. Is there a better UI solution for this?https://lab.civicrm.org/dev/core/-/issues/3899Creating a cms user account from a civi org contact converts the org contact ...2022-10-25T11:47:42ZDaveDCreating a cms user account from a civi org contact converts the org contact into an individualThis might be drupal 9 only - it seems ok in drupal 7 but haven't tried any others.
While there have been arguments that [corporations are people](https://www.npr.org/2014/07/28/335288388/when-did-companies-become-people-excavating-the-...This might be drupal 9 only - it seems ok in drupal 7 but haven't tried any others.
While there have been arguments that [corporations are people](https://www.npr.org/2014/07/28/335288388/when-did-companies-become-people-excavating-the-legal-evolution), with some comedy side-benefits, either:
* a civi org contact should stay an org contact when a cms user is created for it (using the actions dropdown on the contact summary - create user record),
* the action shouldn't be allowed
Since it seems to have worked in drupal 7, probably the first one.https://lab.civicrm.org/dev/core/-/issues/3898CiviCRM log triggers don't fire on CASCADE DELETE2022-10-25T11:48:10ZbrienneCiviCRM log triggers don't fire on CASCADE DELETEOverview
----------------------------------------
When there is a CASCADE DELETE on an entity record, it does not trigger the CiviCRM log for the records (such as from a custom field attached to an entity) that are deleted as a result of...Overview
----------------------------------------
When there is a CASCADE DELETE on an entity record, it does not trigger the CiviCRM log for the records (such as from a custom field attached to an entity) that are deleted as a result of the cascade. This behavior makes it difficult to restore custom data from the log tables when the entity it was attached to is deleted and then needs to be restored.
Reproduction steps
----------------------------------------
1. Create a custom field to be *Used For* Grants (**Administer > Custom data and Screens > Custom Fields > Add Set of Custom Fields**)
1. Create a new Grant record and be sure to fill out the custom field(s) (**CiviGrant > New Grant**)
1. Delete the grant record (**CiviGrant Dashboard > View > Delete**)
1. View the log table of the custom field and you will note that there is no delete log_action on the custom field in question
* If using the command line or a SQL editor like DBeaver, you can use the following command to note the lack of the delete action from the custom field civicrm_log table. (*Be sure to change tablename to the actual log table's name*).
```sql
SELECT id, log_date, log_action FROM tablename;
Current behaviour
----------------------------------------
If a record is deleted as a result of a CASCADE DELETE, then the action is not logged in the applicable civicrm_log table.
Expected behaviour
----------------------------------------
The log triggers should fire on records that are deleted, even if as a result of a CASCADE DELETE.
Comments
----------------------------------------
This issue has been previously noted on this [post](https://stackoverflow.com/questions/26328570/on-delete-cascade-not-firing-trigger) on Stack Overflow.https://lab.civicrm.org/dev/core/-/issues/3896api.Contact.create happy to create invalid employer relationship2022-10-20T07:25:22Zkonadaveapi.Contact.create happy to create invalid employer relationshipOverview
----------------------------------------
api.Contact.create does not check that the relationship between `employer_id` and the contact is valid.
Reproduction steps
----------------------------------------
Reproduced on dmaster....Overview
----------------------------------------
api.Contact.create does not check that the relationship between `employer_id` and the contact is valid.
Reproduction steps
----------------------------------------
Reproduced on dmaster.demo using combo of UI and API 3 Explorer. Showing as command line here to better illustrate.
```bash
$ cv api Contact.create first_name="Mickey" last_name="Mouse" email="mickey.mouse@example.com" contact_type="Individual"
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 9,
"values": {...}
}
$ cv api Contact.create first_name="Minnie" last_name="Mouse" email="minnie.mouse@example.com" contact_type="Individual"
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 10,
"values": {...}
}
$ cv api RelationshipType.getsingle name_b_a="Employer of" return="id,contact_type_b"
{
"id": "5",
"contact_type_b": "Organization"
}
$ cv api Relationship.create contact_id_a="9" contact_id_b="10" relationship_type_id="5"
{
"tip": "add debug=1 to your API call to have more info about the error",
"is_error": 1,
"error_message": "Invalid Relationship"
}
$ cv api Contact.create id="9" employer_id="10"
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 9,
"values": {...}
}
$ cv api Relationship.get contact_id_a="9"
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 5,
"values": {
"5": {
"id": "5",
"contact_id_a": "9",
"contact_id_b": "10",
"relationship_type_id": "5",
"is_active": "1",
"is_permission_a_b": "0",
"is_permission_b_a": "0",
"created_date": "2022-10-05 19:48:23",
"modified_date": "2022-10-05 19:48:23"
}
}
}
```
Current behaviour
----------------------------------------
An invalid relationship is created. On the contact summary screen, an employer may or may not be listed, but it's unlikely to be the invalid contact (i.e. it lists a unrelated org instead).
Expected behaviour
----------------------------------------
The API call should fail for the same reason as api.Relationship.create.
Environment information
----------------------------------------
Confirmed on dmaster.demo, and a local vanilla install of D9/Civi 5.48.2.https://lab.civicrm.org/dev/core/-/issues/3895SK/FB: Labelling a SK Form Builder form identically to a packaged search over...2022-10-25T11:48:33ZJonGoldSK/FB: Labelling a SK Form Builder form identically to a packaged search overwrites itIf you create two Search Forms with the same label, the machine name of the second one will automatically be changed. Eg. two forms labelled "Example" will create `afSearchExample` and `afSearchExample1`.
However, if one of the forms i...If you create two Search Forms with the same label, the machine name of the second one will automatically be changed. Eg. two forms labelled "Example" will create `afSearchExample` and `afSearchExample1`.
However, if one of the forms is a packaged form, this is NOT true.
### Steps to Replicate
* Enable an extension that provides a packaged SK form (e.g. CiviGrant provides `afSearchGrants`.
* Create a minimal Search Kit search.
* Create a form from that search and name it `Grants`.
### Expected Result
The new FB form is named `afSearchGrants1` and is separate from the packaged FB search form.
### Actual Result
The new FB form is named `afSearchGrants` and replaces the old form. You can't revert this without CLI access to rename the `.html` and `.json` files in `[civicrm.files]/ang`.
This came about when a client created a new FB search form and named it "Grants", causing their Grants tab to disappear.
I suspect that the naming behavior looks at other files in the same folder, and appends the `1` if it finds a file of the same name. It should be comparing against all `.aff.*` files. It should provide a warning that you're going to replace a core FB form.https://lab.civicrm.org/dev/core/-/issues/3891Show ical and Google Calendar links for non-public events2022-10-25T11:50:06ZlarsssandergreenShow ical and Google Calendar links for non-public eventsCurrently, the Download iCalendar entry for this event and Add event to Google Calendar links only appear in event confirmation emails, on the event confirmation page and on the event info page if the event is public.
But if someone has...Currently, the Download iCalendar entry for this event and Add event to Google Calendar links only appear in event confirmation emails, on the event confirmation page and on the event info page if the event is public.
But if someone has registered for an event, they should be able to add that event to their calendar regardless of whether it is public or not. The event info page can also include these links as the calendar links contain the same information as is already found on the page.
For reference, the help text for Public Event says: "When enabled, this event will be included in iCalendar feeds and displayed on your site's "Upcoming Events" block." So there shouldn't be any expectation that we're hiding calendar links for non-public events as this settings controls only calendar _feeds_. Can't see any reason we'd want to hide calendar links, in any case.
Turns out the links fail when the event is non-public, so I'll have to fix that first.https://lab.civicrm.org/dev/core/-/issues/3890Proposal: Rebuild smart group cache for specific smart groups included in mai...2022-10-25T11:50:42ZlarsssandergreenProposal: Rebuild smart group cache for specific smart groups included in mailing at scheduling timeIdeally, the recipients of a mailing with smart groups should be as up to date as possible when the mailing is scheduled. Currently, a cached version of the smart group is used to build the list of recipients, leading to potentially out ...Ideally, the recipients of a mailing with smart groups should be as up to date as possible when the mailing is scheduled. Currently, a cached version of the smart group is used to build the list of recipients, leading to potentially out of date recipients.
Can we just rebuild the smart group cache for the specific smart groups included in a mailing at scheduling time? Is there significant risk to doing so?
@eileen, I understand you're the expert on this.https://lab.civicrm.org/dev/core/-/issues/3889API4 dates entered without time can give unexpected results2022-10-25T11:50:59ZlarsssandergreenAPI4 dates entered without time can give unexpected resultsFor a datetime field, any date in an API call is converted to a datetime (midnight on the date in question). This can give unexpected results for gets, especially using Search Kit or Form Builder, where users probably aren't thinking abo...For a datetime field, any date in an API call is converted to a datetime (midnight on the date in question). This can give unexpected results for gets, especially using Search Kit or Form Builder, where users probably aren't thinking about dates versus datetimes. These results also aren't consistent with what you get from Advanced Search or other searches.
For example, searching for a contribution with receive_date = 2022-01-01 does not return all contributions received on that date. It only returns contributions received at exactly midnight, i.e. with receive_date = 20220101000000.
Similar issues exist for other operators, like !=, > (will include the date), <= (won't include the date), BETWEEN and NOT BETWEEN (will include the from date, but not the to date), and IN and NOT IN.
The simplest solution would be to put a SQL DATEFORMAT() around the database date field when the date does not include a time and use a Ymd format. This wouldn't work for BETWEEN or IN when one date includes a time and the other doesn't though.
Or if we don't want to change the query, another approach would be to check absolute dates entered into the API to see if they include a time component or not.
- If they include a time, proceed as usual.
- If they don't include times, for all operators except = and !=/<>, set the time component or components depending on the operator (e.g. for BETWEEN set 000000 for the from date, 235959 for the to date).
- For = or !=, switch the operator to BETWEEN or NOT BETWEEN, set the from date to 000000 and the to date to 235959.
- For IN and NOT IN, I'm not sure there's an easy solution in this case. We'd have to convert that to a series of BETWEENs and that's going to be difficult. Is there a good way to warn users that this won't work?
- Not sure what the other operators are supposed to do with dates.
But maybe there's a more elegant solution to this problem. Hoping to get some expert feedback before starting any work on this, since date stuff can be such a quagmire.https://lab.civicrm.org/dev/core/-/issues/3886api3 explorer giving strange advice for customfield.create2022-10-10T10:01:22ZDaveDapi3 explorer giving strange advice for customfield.createDoing a get gives "String" and "Text", which matches my memory and v4 explorer. But I'm not sure when this changed.
![Untitled3](/uploads/a9e8e188fec92c45f2e1dd8aad3e9bef/Untitled3.png)Doing a get gives "String" and "Text", which matches my memory and v4 explorer. But I'm not sure when this changed.
![Untitled3](/uploads/a9e8e188fec92c45f2e1dd8aad3e9bef/Untitled3.png)https://lab.civicrm.org/dev/core/-/issues/3883Group - remove contacts action removes contacts who are not in group and repo...2022-10-25T11:51:49ZlarsssandergreenGroup - remove contacts action removes contacts who are not in group and reports incorrect numbers removedOverview
----------------------------------------
[removeContactsFromGroup](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/BAO/GroupContact.php#L156) doesn't check if a contact is in a g...Overview
----------------------------------------
[removeContactsFromGroup](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/BAO/GroupContact.php#L156) doesn't check if a contact is in a group before removing or deleting them, resulting in some strange behaviour. The reported counts shown to the user of contacts removed are also incorrect. Subscription history is set when it doesn't need to be.
This function is also used by Api3 and for unsubscribes.
Current behaviour
----------------------------------------
If we're removing, no matter what the current status of the contact is in the group (Added, Pending, Removed or none at all), the status is set to Removed. If a contact had no relationship to the group at all, they will be set to Removed (and show on the Contact Groups tab as removed, which is confusing for the user as they were never in the group). In all cases, subscription history is added with status Removed.
Counts of contacts removed reported to user are incorrect.
If we're deleting, the row is simply deleted from the table. In all cases, subscription history is added with status Deleted.
Expected behaviour
----------------------------------------
If we're removing:
- If a contact is currently Added or Pending, it is set to Removed and subscription history is added.
- If a contact is Removed or has no group status, nothing happens.
This is somewhat confusing for smart groups. If a contact is not in a smart group because they don't meet the smart group criteria, do we want to set them to Removed, so they are effectively pre-removed if they later meet the smart group criteria? I think we do want this to happen for mailing groups because this function is used for unsubscribes. We don't want a contact to later become part of a smart group that was used for a mailing that they unsubscribed from, so I think we do want to set status to Removed no matter what.
Counts reported to user should also be correct based on what actually happened.
If we're deleting:
- If a contact is currently Added, Pending or Removed, it is deleted from the table and subscription history is added. For smart groups, this resets the contact to being a smart member of the group or not based on the smart group criteria.
- If a contact has no group status, nothing happens.
Fix
----------------------------------------
If this makes sense, I'll submit a PR.
Confusingly, removeContactsFromGroup is also used to _add_ contacts to a group [here.](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/Page/View/GroupContact.php#L173) I will change that to use addContactsToGroup for Added or Pending. This will result in a change to the op for the hooks though (from `CRM_Utils_Hook::pre('edit', 'GroupContact'...` to `CRM_Utils_Hook::pre('create', 'GroupContact'...`. [The docs](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_pre/) say create is correct for a contact being added to a group, so it appears this is not correct as it stands. Definitely would value an expert opinion on this aspect.https://lab.civicrm.org/dev/core/-/issues/3882SearchKit - distinct values should be sorted by id2022-10-25T11:52:13ZvitiusSearchKit - distinct values should be sorted by idWhen we have List of contact name and dont use distinct. On output we get sorted list of names on contact id. And when we want have hyperlinks on contacts name, that works perfectly. But when we use distinct function, on output we get un...When we have List of contact name and dont use distinct. On output we get sorted list of names on contact id. And when we want have hyperlinks on contacts name, that works perfectly. But when we use distinct function, on output we get unsorted list of names. But links on contacts is sorted by contact id. That causes missmatch. First of display name have link to lowest contact id and last of display name have link to highest contact id.
I tried this on version 5.51.1 and 5.55.alpha1. And I tried this on case clients (you need enable multiple case clients) like you can see on images bellow. Also I tried this on event participants, where I use aggregation on event id and display participants names. On both distinct causes bad hyper links.
![image](/uploads/7fd977598194996923ddf3e1a698b261/image.png)
![image](/uploads/ac8b4684a84cc8da39b7179eff4ee749/image.png)