CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-11-20T12:13:45Zhttps://lab.civicrm.org/dev/core/-/issues/4782Mailing system doesn't work with DigitalOcean managed databases2023-11-20T12:13:45ZrobertgarrigosMailing system doesn't work with DigitalOcean managed databasesOverview
----------------------------------------
When creating a new mailing adding a group in the recipients field triggers an error:
Possibly unhandled rejection: {"error_code":-1,"sql":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipie...Overview
----------------------------------------
When creating a new mailing adding a group in the recipients field triggers an error:
Possibly unhandled rejection: {"error_code":-1,"sql":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci","debug_info":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci [nativecode=3161 ** Storage engine MEMORY is disabled (Table creation is disallowed).]","entity":"Mailing","action":"create","is_error":1,"error_message":"DB Error: unknown error","debug_information":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci”}
https://civicrm.stackexchange.com/questions/45905/storage-engine-memory-is-disabled-with-digitalocean-managed-database
Reproduction steps
----------------------------------------
1. Create a new mailing
1. add a group to the recipients field
1. Got error on console as well as "estimating" label get locked
1. You need to have the civicrm database hosted in a DigitalOcean manage database cluster
Expected behaviour
----------------------------------------
Groups should get added and count of contacts should be shown next to the recipients field
Comments
----------------------------------------
Fixed by changing line 67 of CRM/Utils/SQL/TempTable.php from `const MEMORY = 'ENGINE=MEMORY';` to `const MEMORY = 'ENGINE=InnoDB';`
I'm aware that you could think that this is a DigitalOcean Problem (they have unsetted the ability to set internal_tmp_mem_storage_engine to MEMORY), but I wonder if the Memory Engine is necessary at all.https://lab.civicrm.org/dev/core/-/issues/4780when processing bounce emails, don't exit on fatal error if verp unverified2023-11-18T01:34:31Zlcdwebwhen processing bounce emails, don't exit on fatal error if verp unverifiedWhen cycling through bounced emails, the current behavior is to exit with a fatal error if Verp handling is enabled and the email is not verified. This effectively prevents any bounces from processing. Instead we should skip the problem ...When cycling through bounced emails, the current behavior is to exit with a fatal error if Verp handling is enabled and the email is not verified. This effectively prevents any bounces from processing. Instead we should skip the problem email and continue processing.5.68.0lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/4779Contribution page receipt does not include on behalf of profile information w...2023-12-08T08:43:34ZalicefruminContribution page receipt does not include on behalf of profile information when a contact contributes on behalf of an organization that they are not an employee ofOverview
----------------------------------------
This is a really really edge case situation. You can configure a contribution page so that you can contribute on behalf of an organization. The list of organizations you can select from ...Overview
----------------------------------------
This is a really really edge case situation. You can configure a contribution page so that you can contribute on behalf of an organization. The list of organizations you can select from is all the organizations you have a permissioned relationship to (regardless of what the relationship type is), however the receipt will not include the on behalf of profile information unless the relationship type is "Employee of". This is an issue for a client of ours that has a membership type that is inherited thru a custom relationship type.
I think that the problem is this code: https://github.com/civicrm/civicrm-core/blob/5.67/CRM/Contribute/BAO/Contribution.php#L2306
I have a patch that deals with this for our clients specific issue but Im not sure its the best fit for core.
Reproduction steps
----------------------------------------
1. Create a Contribution Page where:
- on behalf of is turned on
- receipts are turned on
- A payment processor is available to use (the problem cannot be recreated if you do a pending pay later contribution)
2. For your user, create a relationship:
- to an organization
- of any relationship type besides "Employee of"
- that has view/update permissions in both directions.
- If your user has an employer make sure you are selecting an organization that is different than your employer.
3. Go to the contribution page on the frond end
4. In the on behalf of section, select the organization you have a relationship to that is not thru an "Employee of" relationship (that you created in step 2)
5. Make a "live" payment (you can use the dummy payment processor, just don't use the invoice option)
Current behaviour
----------------------------------------
The receipt does not include the on behalf of profile information.
Expected behaviour
----------------------------------------
The receipt should include the on behalf of profile information.
Environment information
----------------------------------------
I am able to replicate this in civicrm 5.67https://lab.civicrm.org/dev/core/-/issues/4777SearchKit 'LIKE' failing2023-11-14T16:39:12Zaydunsaidan.saunders@squiffle.ukSearchKit 'LIKE' failingOverview
----------------------------------------
Some uses of 'LIKE' don't work - eg dropdown labels.
Reproduction steps
----------------------------------------
1. Create a SK search for Contacts
1. Add `WHERE` `Constituent Informatio...Overview
----------------------------------------
Some uses of 'LIKE' don't work - eg dropdown labels.
Reproduction steps
----------------------------------------
1. Create a SK search for Contacts
1. Add `WHERE` `Constituent Information: Marital Status` `Is Like` `%partner%`
1. Search
2. Expand the Query Info section
See this [dmaster link](https://dmaster.demo.civicrm.org/civicrm/admin/search#/create/Contact?params=%7B%22version%22:4,%22select%22:%5B%22id%22,%22sort_name%22,%22contact_type:label%22,%22contact_sub_type:label%22%5D,%22orderBy%22:%7B%7D,%22where%22:%5B%5B%22constituent_information.Marital_Status:name%22,%22LIKE%22,%22%25partner%25%22%5D%5D,%22groupBy%22:%5B%5D,%22join%22:%5B%5D,%22having%22:%5B%5D%7D)
Current behaviour
----------------------------------------
In API, the `where` clause is as expected:
```
"where": [
[
"constituent_information.Marital_Status:name",
"LIKE",
"%partner%"
]
],
```
But the SQL is wrong:
```
WHERE (`constituent_information_1`.`marital_status_2` LIKE "")
```
Expected behaviour
----------------------------------------
The user's intent was to find contacts where the dropdown label matches the specified pattern.
1. The intent is to search on the label, but only the name is available
2. The pattern `%partner%` does not make it into the SQL at all.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->https://lab.civicrm.org/dev/core/-/issues/4776Todo: Look at whether these test fails mean anything2023-11-14T16:38:47ZDaveDTodo: Look at whether these test fails mean anythingSomewhere in their flow, they call CRM_Core_Form::getAuthenticatedCheckSumContactID and it calls CRM_Core_Form::getRequestedContactID which returns null. Should it be null or the correct contact id?
This maybe qualifies as a regression ...Somewhere in their flow, they call CRM_Core_Form::getAuthenticatedCheckSumContactID and it calls CRM_Core_Form::getRequestedContactID which returns null. Should it be null or the correct contact id?
This maybe qualifies as a regression but at the moment I don't have a specific bug. It came up in the context of https://github.com/civicrm/civicrm-core/pull/28128 where they all fail if validateAuthenticatedCheckSumContactID() is expecting not null.
api_v3_ContributionPageTest.testValidate
api_v3_ContributionPageTest.testValidatePost
api_v3_ContributionPageTest.testValidateOutputOnMissingRecurFields
CRM_Contribute_Form_Contribution_ConfirmTest.testPayNowPayment
CRM_Contribute_Form_Contribution_ConfirmTest.testSeparatePaymentConfirm
CRM_Contribute_Form_Contribution_MainTest.testSetRecurFunction
CRM_Contribute_Form_Contribution_MainTest.testSetRecurFunctionOptionalYes
CRM_Contribute_Form_Contribution_MainTest.testSetRecurFunctionOptionalNo
CRM_Contribute_Form_Contribution_MainTest.testSetRecurFunctionNotAvailable
CRM_Contribute_Form_Contribution_MainTest.testExpiredPriceSet
CRM_Contribute_Form_ContributionTest.testContributionBasePreProcess
CRM_Core_FormTest.testGetAuthenticatedUser
CRM_Event_Form_Registration_ConfirmTest.testSubmit
CRM_Event_Form_Registration_ConfirmTest.testWaitlistRegistrationContactIDParam
CRM_Event_Form_Registration_ConfirmTest.testTaxMultipleParticipant
CRM_Event_Form_Registration_ConfirmTest.testMailMultipleParticipant
CRM_Event_Form_Registration_ConfirmTest.testOnlineRegNoPrice
CRM_Event_Form_Registration_ConfirmTest.testSubmitNonPrimaryEmail
CRM_Event_Form_Registration_ConfirmTest.testRegistrationWithoutCiviContributeEnabled
CRM_Event_Form_Registration_ConfirmTest.testPaidSubmit with data set #0
CRM_Event_Form_Registration_ConfirmTest.testPaidSubmit with data set #1
CRM_Event_Form_ParticipantTest.testTransferParticipantRegistration
CRM_Event_Form_SelfSvcTransferTest.testCancel
CRM_Event_Form_Registration_ConfirmTest.testNoteSubmissionhttps://lab.civicrm.org/dev/core/-/issues/4774Queue: hook_QueueTaskError missing some params2023-11-13T20:53:09ZdamilareQueue: hook_QueueTaskError missing some paramsSetting up 4 parameters in the hook_QueueTaskError in an extension throws an exception stating the function got 2 parameters instead of 4.
Error:
```
WD php: ArgumentCountError: Too few arguments to function wmf_civicrm_civicrm_queueTas...Setting up 4 parameters in the hook_QueueTaskError in an extension throws an exception stating the function got 2 parameters instead of 4.
Error:
```
WD php: ArgumentCountError: Too few arguments to function wmf_civicrm_civicrm_queueTaskError(), 2 passed in /home/cividev/buildkit/build/wmff/drupal/sites/all/modules/civicrm/CRM/Utils/Hook.php on line 276 and exactly 4 expected in wmf_civicrm_civicrm_queueTaskError() (line 612 of [error]
/home/cividev/buildkit/build/wmff/drupal/sites/default/civicrm/extensions/wmf-civicrm/wmf_civicrm.php).
ArgumentCountError: Too few arguments to function wmf_civicrm_civicrm_queueTaskError(), 2 passed in /home/cividev/buildkit/build/wmff/drupal/sites/all/modules/civicrm/CRM/Utils/Hook.php on line 276 and exactly 4 expected in wmf_civicrm_civicrm_queueTaskError() (line 612 of /home/cividev/buildkit/build/wmff/drupal/sites/default/civicrm/extensions/wmf-civicrm/wmf_civicrm.php).
```
Here is the code in `CRM/Utils/Hooks.php`:
```
public static function queueTaskError(CRM_Queue_Queue $queue, $item, &$outcome, ?Throwable $exception) {
$null = NULL;
return self::singleton()->invoke(['job', 'params'], $queue, $item,
$outcome, $exception, $null, $null,
'civicrm_queueTaskError'
);
}
```5.69.0https://lab.civicrm.org/dev/core/-/issues/4772unable to authenticate in Joomla using Authx2023-11-15T13:43:10Zlcdwebunable to authenticate in Joomla using AuthxWhen using Authx to authenticate external CURL API calls in Joomla, we receive the error:
`Class "CRM_Utils_FakeJoomlaSession" not found.`When using Authx to authenticate external CURL API calls in Joomla, we receive the error:
`Class "CRM_Utils_FakeJoomlaSession" not found.`5.69.0lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/4770When adding a follow up activity on an existing case activity with multiple a...2023-11-15T16:16:35ZErikHommelWhen adding a follow up activity on an existing case activity with multiple assignees only one is savedOverview
----------------------------------------
When I add a follow up activity on an existing activity in a case (does not happen on non-case activities) and add more than 1 assignee, only the first assignee is actually saved on the a...Overview
----------------------------------------
When I add a follow up activity on an existing activity in a case (does not happen on non-case activities) and add more than 1 assignee, only the first assignee is actually saved on the activity.
Reproduction steps
----------------------------------------
1. Find an existing case activity
2. Add a follow up activity with multiple assignees
3. Hit save
Current behaviour
----------------------------------------
Only the first assignee is saved
Expected behaviour
----------------------------------------
All assignees should be saved
Environment information
----------------------------------------
CiviCRM 5.66.05.69.0ErikHommelErikHommelhttps://lab.civicrm.org/dev/core/-/issues/4765Add label field to OAuthClient entity2023-11-14T16:35:42ZjensschuppeAdd label field to OAuthClient entity## Overview
We came across a use-case for multiple _OAuthClient_ entites with the same _Client ID_, which makes differentiating them difficult in the UI. We'd like to propose adding a field for an administrative label to the _OAuthClien...## Overview
We came across a use-case for multiple _OAuthClient_ entites with the same _Client ID_, which makes differentiating them difficult in the UI. We'd like to propose adding a field for an administrative label to the _OAuthClient_ entity and defining it as the `label_field`. It might also be a good idea to make labels required.
## Proposed behaviour
We're currently building an API extension for synchronizing data from another CRM-like system that requires authorization via OAuth and differentiates multiple instances/sources by using different access tokens for the same client ID/secret.
Our sync API uses configurable profiles which have the OAuth client as a configuration option, so there's a field for selecting an OAuth client in the UI. The only attribute for differentiating OAuth clients in that field is their internal (CiviCRM) ID, as Client ID and secret are the same and the access token should not be exposed and might change. This is not convenient for admins, as they will have to remember which (internal) OAuth client ID corresponds to which instance, which is likely to cause misconfigurations and errors.
I guess this will need:
* the XML schema of the `OAuthClient` entity be extended with a `label` field
* `civix generate:entity-boilerplate`
* Upgrade script for applying schema changes - thanks @eileen!
* anything else?
Happy to hear your thoughts!https://lab.civicrm.org/dev/core/-/issues/4764SearchKit: permission for entity (expenses) needed to access SearchKit as non...2023-11-29T20:01:34ZMariaVSearchKit: permission for entity (expenses) needed to access SearchKit as non-adminWhen there is a SearchKit form with entity expenses, non-admins without the permission "manage expenses" can not access SearchKit.
When I try to open SearchKit (via Search > SearchKit) without the permission I get the following error mes...When there is a SearchKit form with entity expenses, non-admins without the permission "manage expenses" can not access SearchKit.
When I try to open SearchKit (via Search > SearchKit) without the permission I get the following error message: "Civi\API\Exception\UnauthorizedException: Authorization failed in /html/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php on line 149"
This seems to be a bug and might be true for other specific entities, too.https://lab.civicrm.org/dev/core/-/issues/4763Issues - contribution page when membership amount + contribution in play2023-11-17T01:29:53ZeileenIssues - contribution page when membership amount + contribution in playI'm trying to fix up the online membership receipt template to be consistent with the others but hitting multiple issues/ unexpected variations so documenting.
Scenarios
| Scenario | Separate Membership Payment|Contribution Amount|Mem...I'm trying to fix up the online membership receipt template to be consistent with the others but hitting multiple issues/ unexpected variations so documenting.
Scenarios
| Scenario | Separate Membership Payment|Contribution Amount|Membership|Contribution Amount|Email details|issues |
| --------- | ------------------------- |------------------- |------- |------------------- |------- |------- |
| 1 | yes |10 |$100 General|10, 100 |2, online contribution ($10) + online membership ($100), membership info & membership fee sections|tax not applied https://lab.civicrm.org/dev/financial/-/issues/154 |
| 2 | yes |10 | free membership|2, $10 + pending $0 |$10 contribution receipt only |creates pending $0 (should be completed), no membership receipt, https://lab.civicrm.org/dev/core/-/issues/3325|
| 3 | yes |10 | no thanks for membership|$10|contribution receipt only ||
| 4 | yes |0 option | $100 General|0, 100 (both completed)|online contribution,membership |- the online contribution receipt has no amount - confusing but not necessarily a bug |
| 5 | yes |no thanks | $100 General|100 |membership receipt only | |
| 6 | yes |other amount ($5) | $100 General|$5 only|? - retest this |? - retest this|
| 7 | no |10 |$100 General|------------------- |------- |issues |
| 8 | no |10 | free membership|------------------- |------- |issues |
| 9 | no |10 | no thanks for membership|------------------- |------- |issues |
| 10 | no |0 option | $100 General|------------------- |------- |issues |
| 11 | no |no thanks | $100 General|------------------- |------- |issues |
| 12 | no |other amount ($5) | $100 General|------------------- |------- |issues |
Online membership receipt sections
- Membership Information
![image](/uploads/dc86d33bea219f8b05f5f9c388badadd/image.png)
- Memberhsip fee section
![image](/uploads/6bc733f73e9d35191f0f98fc0ce181d3/image.png)https://lab.civicrm.org/dev/core/-/issues/4762SearchUI: Manage Extensions with SK/FB2023-11-14T16:34:11Zaydunsaidan.saunders@squiffle.ukSearchUI: Manage Extensions with SK/FBIssues relating to replacing the 'Manage Extensions' page with SK/FB
Enable SearchUI extension then go to Administer > Experimental > Extensions
## Required to match current functionality:
- [ ] Way to determine whether extension ne...Issues relating to replacing the 'Manage Extensions' page with SK/FB
Enable SearchUI extension then go to Administer > Experimental > Extensions
## Required to match current functionality:
- [ ] Way to determine whether extension needs updating
- [ ] API enhancement (?) to get info.xml data
- [ ] Expandable sections - or show in pop-up?
- [ ] Metadata update to add 'Install', 'Upgrade' and 'Disable' actions
- [ ] Functionality to show not-installed extensions (ie 'Add New' tab)
## Improvements:
- [ ] Separate core/required from community extensions (could be filters or tabs)
- [ ] Better handling of extensions with local githttps://lab.civicrm.org/dev/core/-/issues/4760[PHP 8.2] Access to an undefined property in CRM_Contribute_Form_Contribution...2023-12-08T23:38:04Zjofranzfranz@systopia.de[PHP 8.2] Access to an undefined property in CRM_Contribute_Form_Contribution_ConfirmI tried to add the info to this report:
```
➜ civicrm-core (2b6d15a4629bff5922f35f33ce15e909ff633666) phpstan analyse -l 0 CRM/Contribute/Form/Contribution/Confirm.php
------ ----------------------------------------------------------...I tried to add the info to this report:
```
➜ civicrm-core (2b6d15a4629bff5922f35f33ce15e909ff633666) phpstan analyse -l 0 CRM/Contribute/Form/Contribution/Confirm.php
------ -------------------------------------------------------------------------------------------------------------------------------
Line CRM/Contribute/Form/Contribution/Confirm.php
------ -------------------------------------------------------------------------------------------------------------------------------
270 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
489 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
554 Access to an undefined property object::$_membershipBlock.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
704 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_membershipTypeValues.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
1485 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
2290 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
2301 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
2478 Access to an undefined property CRM_Contribute_Form_Contribution_Confirm::$_lineItem.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ -------------------------------------------------------------------------------------------------------------------------------
```
Related: #4072https://lab.civicrm.org/dev/core/-/issues/4759Search Preferences -> Autocomplete Contact Search selections not respected2023-11-13T20:03:23ZalicefruminSearch Preferences -> Autocomplete Contact Search selections not respectedOverview
----------------------------------------
Search Preferences -> Autocomplete Contact Search selections not respected by quicksearch.
Reproduction steps
----------------------------------------
1. login as an admin
2. Go to CiviC...Overview
----------------------------------------
Search Preferences -> Autocomplete Contact Search selections not respected by quicksearch.
Reproduction steps
----------------------------------------
1. login as an admin
2. Go to CiviCRM Admin Menu -> Administer -> Customize Data and Screens -> Search Preferences
3. Update the "Autocomplete Contact Search" field to include "Postal Code"
4. Click "Save"
5. Clear Caches
6. Search for a contact with a postal code in the quicksearch box.
Current behaviour
----------------------------------------
Postal Code not included in quicksearch results even if the contact has one.
Expected behaviour
----------------------------------------
the postal code should be included in the quicksearch results if the contact has one
Environment information
----------------------------------------
I was able to recreate this on 5.66.2 and 5.69.alpha1https://lab.civicrm.org/dev/core/-/issues/4758[PHP 8.0] Curly brace syntax for accessing array elements2023-11-08T16:24:07Zjofranzfranz@systopia.de[PHP 8.0] Curly brace syntax for accessing array elements```
FILE: civicrm-core/tools/extensions/org.civicrm.angularex/angularex.civix.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------...```
FILE: civicrm-core/tools/extensions/org.civicrm.angularex/angularex.civix.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------
247 | ERROR | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4 and removed in PHP 8.0. Found: $entry{0}
--------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------
``5.69.0https://lab.civicrm.org/dev/core/-/issues/4757[PHP 8.2] Using ${var} in strings is deprecated2023-11-08T02:24:46Zjofranzfranz@systopia.de[PHP 8.2] Using ${var} in strings is deprecated```
FILE: civicrm-core/CRM/Profile/Selector/Listings.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------...```
FILE: civicrm-core/CRM/Profile/Selector/Listings.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
601 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${typeName}
-------------------------------------------------------------------------------------------------------------
```5.69.0https://lab.civicrm.org/dev/core/-/issues/4756CV crashes if LoginSecurity extension is enabled on Drupal8/9/102023-11-08T00:49:16ZufundoCV crashes if LoginSecurity extension is enabled on Drupal8/9/10Any cv call crashes if the [LoginSecurity](https://lab.civicrm.org/extensions/loginsecurity/-/issues) extension is enabled on D8+.
```
civicrm@c307847fd84a:/var/www/html$ cv -vvv vars:show
... [all looks good until] ...
[Bootstrap:no...Any cv call crashes if the [LoginSecurity](https://lab.civicrm.org/extensions/loginsecurity/-/issues) extension is enabled on D8+.
```
civicrm@c307847fd84a:/var/www/html$ cv -vvv vars:show
... [all looks good until] ...
[Bootstrap:notice] Call core bootstrap
In Drupal.php line 169:
[Drupal\Core\DependencyInjection\ContainerNotInitializedException]
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
Exception trace:
at /var/www/html/web/core/lib/Drupal.php:169
Drupal::getContainer() at /var/www/html/web/core/lib/Drupal.php:267
Drupal::request() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal8.php:945
CRM_Utils_System_Drupal8->ipAddress() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/System.php:1292
CRM_Utils_System::ipAddress() at /var/www/html/web/modules/civicrm/ext/loginsecurity/CRM/Loginsecurity/BAO/LoginSecurityDevice.php:37
CRM_Loginsecurity_BAO_LoginSecurityDevice::logCurrentSession() at /var/www/html/web/modules/civicrm/ext/loginsecurity/loginsecurity.php:16
loginsecurity_civicrm_config() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:272
CRM_Utils_Hook->runHooks() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/Hook/DrupalBase.php:73
CRM_Utils_Hook_DrupalBase->invokeViaUF() at /var/www/html/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:310
Civi\Core\CiviEventDispatcher::delegateToUF() at /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() at /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /var/www/html/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:263
Civi\Core\CiviEventDispatcher->dispatch() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:168
CRM_Utils_Hook->invoke() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:1440
CRM_Utils_Hook::config() at /var/www/html/vendor/civicrm/civicrm-core/CRM/Core/Config.php:94
CRM_Core_Config::singleton() at phar:///usr/local/bin/cv/lib/src/Bootstrap.php:97
Civi\Cv\Bootstrap->boot() at phar:///usr/local/bin/cv/lib/src/Util/BootTrait.php:73
Civi\Cv\Command\ShowCommand->_boot_full() at phar:///usr/local/bin/cv/lib/src/Util/BootTrait.php:47
Civi\Cv\Command\ShowCommand->boot() at phar:///usr/local/bin/cv/src/Command/ShowCommand.php:21
Civi\Cv\Command\ShowCommand->execute() at phar:///usr/local/bin/cv/vendor/symfony/console/Command/Command.php:127
Cvphar\Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:637
Cvphar\Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:190
Cvphar\Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/cv/src/Application.php:67
Civi\Cv\Application->doRun() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:101
Cvphar\Symfony\Component\Console\Application->run() at phar:///usr/local/bin/cv/src/Application.php:33
Civi\Cv\Application::main() at phar:///usr/local/bin/cv/bin/cv:28
require() at /usr/local/bin/cv:14
```
It looks to me like the extension is trying to call the `CRM_Utils_System::ipAddress()` function before the Drupal container is ready.
And that something like https://lab.civicrm.org/dev/core/-/commit/5e383d9d992335f2f6e743c3e1f3d0ce1b175ab9 should fix it?5.69.0https://lab.civicrm.org/dev/core/-/issues/4753Afform - Custom fields of type YesNo (boolean): Defaults not displayed and ch...2024-03-10T20:37:04Zmattwiremjw@mjwconsult.co.ukAfform - Custom fields of type YesNo (boolean): Defaults not displayed and changes not savedTo reproduce set up a simple submission form:
1. Add Individual
2. Add "is_deceased" field (a Yes / No radio field) (optional)
3. Add a contact custom field of type "YesNo" (optional)
Create a contact and set the contact is_deceased = t...To reproduce set up a simple submission form:
1. Add Individual
2. Add "is_deceased" field (a Yes / No radio field) (optional)
3. Add a contact custom field of type "YesNo" (optional)
Create a contact and set the contact is_deceased = true and custom field "YesNo" = true
Load the form with URL parameter eg. #?Individual1=169 to load that contact
See that is_deceased field is set to Yes but the customfield is not set.
Now set the customfield to "No" and submit the form.
Reload the form and see that it did not save the value of the custom field :-(
So two issues:
1. Custom field value is not displayed: It is retrieved via prefill as a bool but the field is added with radios that have values 0,1.
2. Custom field value is not saved: It is converted to int (0 or 1) once submitted whether submitted as "false" or 0.
I've been round and round trying to work out how this should be fixed but have hit a dead end!
The display issue can be "fixed" by either not passing the options to the form or by passing them with true/false instead of 0,1. But the value still doesn't save.
@colemanw Any ideas?https://lab.civicrm.org/dev/core/-/issues/4752Notice: Undefined index: weight in CRM_Core_Action::{closure}()2023-11-10T13:56:37ZRobert J. LangNotice: Undefined index: weight in CRM_Core_Action::{closure}()Overview
----------------------------------------
The dblog is filling up with errors with this message:
Notice: Undefined index: weight in CRM_Core_Action::{closure}() (line 317 of /mysite/modules/contrib/civicrm/CRM/Core/Action.php).
...Overview
----------------------------------------
The dblog is filling up with errors with this message:
Notice: Undefined index: weight in CRM_Core_Action::{closure}() (line 317 of /mysite/modules/contrib/civicrm/CRM/Core/Action.php).
Reproduction steps
----------------------------------------
I can reproduce this on my site by visiting any contact tab (not just 1195):
https://mysite.org/civicrm/contact/view?reset=1&cid=1195&selectedChild=mailing
Current behaviour
----------------------------------------
The dblog fills up with something like 20 (the number varies) instances of a PHP notice:
Message: Notice: Undefined index: weight in CRM_Core_Action::{closure}() (line 317 of /mysite/modules/contrib/civicrm/CRM/Core/Action.php).
Location: https://mysite.org/civicrm/ajax/contactmailing?contact_id=1195&draw=1&columns%5B0%5D%5Bdata%5D=subject&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=creator_name&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=recipients&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=false&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=start_date&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=openstats&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=false&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=links&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=false&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&_=1699213951856
Referrer: https://mysite.org/civicrm/contact/view?reset=1&cid=1195&selectedChild=mailing
Expected behaviour
----------------------------------------
No dblog entries.
Environment information
----------------------------------------
* __Browser:__ Safari (Desktop)
* __CiviCRM:__ 5.67.0
* __PHP:__ 7.4.31
* __CMS:__ Backdrop 1.26.1
Comments
----------------------------------------
The relevant code is:
```
usort($seqLinks, static function ($a, $b) {
return (int) ((int) ($a['weight']) > (int) ($b['weight']));
});
```
Seems like it should perhaps be
```
usort($seqLinks, static function ($a, $b) {
return (int) ((int) ($a['weight'] ?? 0) > (int) ($b['weight'] ?? 0));
});
```5.67.1https://lab.civicrm.org/dev/core/-/issues/4750clear cache does not reliably remove durable temp tables2023-11-04T16:45:03Zlcdwebclear cache does not reliably remove durable temp tablesDurable (civicrm_tmp_d%) temp tables are intended for use when the table must be used in multiple transactions and therefore cannot be a true MySQL temp table. These should be cleared out when the clean cache function is triggered from t...Durable (civicrm_tmp_d%) temp tables are intended for use when the table must be used in multiple transactions and therefore cannot be a true MySQL temp table. These should be cleared out when the clean cache function is triggered from the UI, scheduled jobs, or CLI -- with a few exceptions for those created within the last two days or that are tied to the civicrm_user_job table. Currently there is faulty logic that causes them to persist much longer than necessary, thus cluttering the DB.lcdweblcdweb