civicrm-core.git
2 years agoremove selenium webtest code
demeritcowboy [Sun, 21 Nov 2021 03:33:09 +0000 (22:33 -0500)]
remove selenium webtest code

2 years agoMerge pull request #22189 from eileenmcnaughton/smarty14
colemanw [Tue, 7 Dec 2021 02:21:37 +0000 (21:21 -0500)]
Merge pull request #22189 from eileenmcnaughton/smarty14

[Smarty variables] Consistently assign isAdmin at php layer

2 years agoMerge pull request #22205 from totten/master-hook-conform
Seamus Lee [Tue, 7 Dec 2021 01:06:37 +0000 (12:06 +1100)]
Merge pull request #22205 from totten/master-hook-conform

APIv4 ConformanceTest - Demonstrate entity APIs which fail to emit `hook_civicrm_post(delete)`

2 years agoMerge pull request #22207 from colemanw/baoDeleteHooks
Tim Otten [Mon, 6 Dec 2021 23:08:36 +0000 (15:08 -0800)]
Merge pull request #22207 from colemanw/baoDeleteHooks

[REF] - Switch BAOs to use standard delete function which calls hooks

2 years agoMerge pull request #22191 from eileenmcnaughton/smarty16
Seamus Lee [Mon, 6 Dec 2021 22:38:38 +0000 (09:38 +1100)]
Merge pull request #22191 from eileenmcnaughton/smarty16

Smarty variables]  Remove isset from a.net

2 years agoMerge pull request #22190 from eileenmcnaughton/smarty15
demeritcowboy [Mon, 6 Dec 2021 19:26:31 +0000 (14:26 -0500)]
Merge pull request #22190 from eileenmcnaughton/smarty15

[Smarty variables] remove isset from Mail accounts

2 years agoMerge pull request #22181 from eileenmcnaughton/smarty8
demeritcowboy [Mon, 6 Dec 2021 17:34:08 +0000 (12:34 -0500)]
Merge pull request #22181 from eileenmcnaughton/smarty8

[Smarty variables] Remove another isset - user dashboard

2 years agoMerge pull request #22216 from demeritcowboy/th-br
Yashodha Chaku [Mon, 6 Dec 2021 16:06:52 +0000 (21:36 +0530)]
Merge pull request #22216 from demeritcowboy/th-br

dev/core#2982 - Remove literal `<br/>` tag in header for Repeat Contributions CiviReport

2 years agoMerge pull request #22177 from eileenmcnaughton/smarty5
demeritcowboy [Mon, 6 Dec 2021 15:25:11 +0000 (10:25 -0500)]
Merge pull request #22177 from eileenmcnaughton/smarty5

Smarty variables]  Remove isset from relationship tab

2 years agoremove br tag in header
demeritcowboy [Mon, 6 Dec 2021 14:16:46 +0000 (09:16 -0500)]
remove br tag in header

2 years agoMerge pull request #22215 from totten/master-mixin-xdebug
demeritcowboy [Mon, 6 Dec 2021 13:58:07 +0000 (08:58 -0500)]
Merge pull request #22215 from totten/master-mixin-xdebug

(NFC) tools/mixin/bin/test-all - Work-around segfault in CI

2 years agotools/mixin/bin/test-all - Work-around segfault in CI
Tim Otten [Mon, 6 Dec 2021 09:29:17 +0000 (01:29 -0800)]
tools/mixin/bin/test-all - Work-around segfault in CI

2 years agoFinancialType - Use standard delete function which calls hooks
Coleman Watts [Sat, 4 Dec 2021 20:17:07 +0000 (15:17 -0500)]
FinancialType - Use standard delete function which calls hooks

2 years agoFinancialAccount - Use standard delete function which calls hooks
Coleman Watts [Sat, 4 Dec 2021 20:02:15 +0000 (15:02 -0500)]
FinancialAccount - Use standard delete function which calls hooks

2 years agoPaymentProcessorType - Use standard delete function which calls hooks
Coleman Watts [Fri, 3 Dec 2021 04:51:22 +0000 (23:51 -0500)]
PaymentProcessorType - Use standard delete function which calls hooks

2 years agoPaymentProcessor - Use standard delete function which calls hooks
Coleman Watts [Fri, 3 Dec 2021 04:22:49 +0000 (23:22 -0500)]
PaymentProcessor - Use standard delete function which calls hooks

2 years agoLocationType - Use standard delete function which calls hooks
Coleman Watts [Fri, 3 Dec 2021 04:17:28 +0000 (23:17 -0500)]
LocationType - Use standard delete function which calls hooks

2 years agoMessageTemplates - Use standard delete function which calls hooks
Coleman Watts [Fri, 3 Dec 2021 03:46:21 +0000 (22:46 -0500)]
MessageTemplates - Use standard delete function which calls hooks

2 years agoMembershipStatus - Use standard delete function which calls hooks
Coleman Watts [Fri, 3 Dec 2021 03:36:38 +0000 (22:36 -0500)]
MembershipStatus - Use standard delete function which calls hooks

2 years agoMembershipType - Use standard delete function which calls hooks
Coleman Watts [Thu, 2 Dec 2021 22:42:34 +0000 (17:42 -0500)]
MembershipType - Use standard delete function which calls hooks

2 years agoRelationshipType - Use standard delete function which calls hooks
Coleman Watts [Thu, 2 Dec 2021 20:59:40 +0000 (15:59 -0500)]
RelationshipType - Use standard delete function which calls hooks

2 years agoWordReplacement - Use generic writeRecords/deleteRecords which call hooks
Coleman Watts [Thu, 2 Dec 2021 20:34:08 +0000 (15:34 -0500)]
WordReplacement - Use generic writeRecords/deleteRecords which call hooks

2 years agoOptionGroup - Use standard delete function which calls hooks
Coleman Watts [Thu, 2 Dec 2021 20:01:44 +0000 (15:01 -0500)]
OptionGroup - Use standard delete function which calls hooks

2 years agoContactType - Use standard delete function which calls hooks
Coleman Watts [Thu, 2 Dec 2021 19:42:45 +0000 (14:42 -0500)]
ContactType - Use standard delete function which calls hooks

2 years agoCaseType - Use standard delete function which calls hooks
Coleman Watts [Thu, 2 Dec 2021 16:08:10 +0000 (11:08 -0500)]
CaseType - Use standard delete function which calls hooks

2 years agoMerge pull request #22211 from totten/master-544-fwd
Tim Otten [Fri, 3 Dec 2021 20:34:25 +0000 (12:34 -0800)]
Merge pull request #22211 from totten/master-544-fwd

Merge forward 5.44 => master

2 years agoMerge remote-tracking branch 'origin/5.44' into master-544-fwd
Tim Otten [Fri, 3 Dec 2021 20:06:01 +0000 (12:06 -0800)]
Merge remote-tracking branch 'origin/5.44' into master-544-fwd

2 years agoMerge pull request #22209 from demeritcowboy/reldate
Tim Otten [Fri, 3 Dec 2021 19:35:36 +0000 (11:35 -0800)]
Merge pull request #22209 from demeritcowboy/reldate

[NFC] Fix test failures for testRelativeDateRanges

2 years agoMerge pull request #22210 from MegaphoneJon/optional-before-required
Seamus Lee [Fri, 3 Dec 2021 18:52:06 +0000 (05:52 +1100)]
Merge pull request #22210 from MegaphoneJon/optional-before-required

PHP 8 compat - no optional param before required

2 years agoPHP 8 compat - no optional param before required
Jon Goldberg [Fri, 3 Dec 2021 15:59:11 +0000 (10:59 -0500)]
PHP 8 compat - no optional param before required

2 years agofix strict equality issue
demeritcowboy [Fri, 3 Dec 2021 14:56:37 +0000 (09:56 -0500)]
fix strict equality issue

2 years agoConformanceTest::checkDeletionAllowed - Coverage for `hook_pre`. Fix `Contact`.
Tim Otten [Fri, 3 Dec 2021 00:26:28 +0000 (16:26 -0800)]
ConformanceTest::checkDeletionAllowed - Coverage for `hook_pre`. Fix `Contact`.

1. Expand assertions used for `hook_post` to check `hook_pre`.

2. Recognize the quirks in how `Contact` records are treated in the hooks.

2 years agoMerge pull request #22206 from totten/5.44-bump0
Tim Otten [Thu, 2 Dec 2021 05:48:42 +0000 (21:48 -0800)]
Merge pull request #22206 from totten/5.44-bump0

5.44.0 - Bump version. Tweak notes.

2 years agoSet version to 5.44.0
Tim Otten [Thu, 2 Dec 2021 05:47:24 +0000 (21:47 -0800)]
Set version to 5.44.0

2 years agorelease-notes/5.44.0.md
Tim Otten [Thu, 2 Dec 2021 05:46:33 +0000 (21:46 -0800)]
release-notes/5.44.0.md

2 years agoMerge pull request #22182 from MegaphoneJon/core-2974
Tim Otten [Thu, 2 Dec 2021 05:43:27 +0000 (21:43 -0800)]
Merge pull request #22182 from MegaphoneJon/core-2974

fixes core#2974, overrides break membership update status when removed

2 years agoMerge pull request #22202 from agh1/5.44.0-releasenotes-final
Tim Otten [Thu, 2 Dec 2021 05:07:23 +0000 (21:07 -0800)]
Merge pull request #22202 from agh1/5.44.0-releasenotes-final

5.44.0 release notes: added late changes

2 years agoMerge pull request #22204 from totten/master-mixin-testall
Tim Otten [Thu, 2 Dec 2021 04:43:25 +0000 (20:43 -0800)]
Merge pull request #22204 from totten/master-mixin-testall

tools/mixin/bin/test-all - Fix guard for EXT_DIR

2 years agoConformanceTest - Demonstrate entity APIs with non-conformant deletion
Tim Otten [Thu, 2 Dec 2021 04:17:22 +0000 (20:17 -0800)]
ConformanceTest - Demonstrate entity APIs with non-conformant deletion

2 years agotools/mixin/bin/test-all - Fix test for EXT_DIR
Tim Otten [Thu, 2 Dec 2021 03:07:01 +0000 (19:07 -0800)]
tools/mixin/bin/test-all - Fix test for EXT_DIR

There are two slightly different dirs - the example-extension and the extension-container (ie child-dir and parent-dir).
We want to assert that the parent-dir is well-formed, but then use the child-dir.

2 years agoMerge pull request #22176 from eileenmcnaughton/smarty4
Eileen McNaughton [Wed, 1 Dec 2021 23:34:49 +0000 (12:34 +1300)]
Merge pull request #22176 from eileenmcnaughton/smarty4

[Smarty variables] [CiviCase] remove isset from case dashboard

2 years agoMerge pull request #22198 from totten/master-mix-dec-first
colemanw [Wed, 1 Dec 2021 23:26:59 +0000 (18:26 -0500)]
Merge pull request #22198 from totten/master-mix-dec-first

civix#175 - Add support for mixins. Switch core extensions to mixin/setting-php

2 years ago5.44.0 release notes: added late changes
Andie Hunt [Wed, 1 Dec 2021 22:46:35 +0000 (17:46 -0500)]
5.44.0 release notes: added late changes

2 years agoMerge pull request #22173 from colemanw/domainStuff
Eileen McNaughton [Wed, 1 Dec 2021 21:23:42 +0000 (10:23 +1300)]
Merge pull request #22173 from colemanw/domainStuff

APIv4 - Add fixes & tests for domain-specific managed entities

2 years agoRemove isset from relationship tab
Eileen McNaughton [Tue, 30 Nov 2021 20:23:07 +0000 (09:23 +1300)]
Remove isset from relationship tab

civicrm/contact/view?reset=1&cid=2&relatedChild=relationship

2 years agofixes core#2974, overrides break membership update status when removed
Jon Goldberg [Tue, 30 Nov 2021 20:57:55 +0000 (15:57 -0500)]
fixes core#2974, overrides break membership update status when removed

2 years agoMerge pull request #21751 from mlutfy/fixCurrencies
Eileen McNaughton [Wed, 1 Dec 2021 19:37:26 +0000 (08:37 +1300)]
Merge pull request #21751 from mlutfy/fixCurrencies

dev/financial#184 Fix currency name for Ghana and Belarus

2 years ago[Smarty variables] remove isset from case dashboard
Eileen McNaughton [Tue, 30 Nov 2021 20:09:49 +0000 (09:09 +1300)]
[Smarty variables] remove isset from case dashboard

2 years agoRemove isset from a.net
Eileen McNaughton [Tue, 30 Nov 2021 22:21:04 +0000 (11:21 +1300)]
Remove isset from a.net

2 years ago[Smarty variables] remove isset from Mail accounts
Eileen McNaughton [Tue, 30 Nov 2021 22:13:56 +0000 (11:13 +1300)]
[Smarty variables] remove isset from Mail accounts

civicrm/admin/mailSettings?reset=1

2 years ago[Smarty variables] Consistently assign isAdmin at php layer
Eileen McNaughton [Tue, 30 Nov 2021 21:56:00 +0000 (10:56 +1300)]
[Smarty variables] Consistently assign isAdmin at php layer

2 years agoMerge pull request #22185 from eileenmcnaughton/smarty11
Eileen McNaughton [Wed, 1 Dec 2021 19:25:40 +0000 (08:25 +1300)]
Merge pull request #22185 from eileenmcnaughton/smarty11

[Smarty variables] - remove isset

2 years agodev/financial#184 Fix currency name for Ghana and Belarus
Mathieu Lutfy [Mon, 11 Oct 2021 13:04:09 +0000 (09:04 -0400)]
dev/financial#184 Fix currency name for Ghana and Belarus

2 years agoMerge pull request #22179 from eileenmcnaughton/smarty6
Eileen McNaughton [Wed, 1 Dec 2021 09:42:06 +0000 (22:42 +1300)]
Merge pull request #22179 from eileenmcnaughton/smarty6

[Smarty variables]  Fix contribution tab to work with escape by default

2 years agoMerge pull request #22196 from eileenmcnaughton/smarty21
Eileen McNaughton [Wed, 1 Dec 2021 09:26:29 +0000 (22:26 +1300)]
Merge pull request #22196 from eileenmcnaughton/smarty21

[Smarty variables] The last isset....

2 years agomixin/setting-php - Remove unused boilerplate
Tim Otten [Wed, 1 Dec 2021 01:27:28 +0000 (17:27 -0800)]
mixin/setting-php - Remove unused boilerplate

2 years agomixin/setting-php - Convert live settings from `hook_alterSettingsFolder` to `<mixin>`
Tim Otten [Wed, 1 Dec 2021 00:43:26 +0000 (16:43 -0800)]
mixin/setting-php - Convert live settings from `hook_alterSettingsFolder` to `<mixin>`

2 years agomixin/setting-php - Import
Tim Otten [Tue, 30 Nov 2021 22:26:42 +0000 (14:26 -0800)]
mixin/setting-php - Import

2 years agomixin/polyfill.php - Import. Update comments.
Tim Otten [Tue, 30 Nov 2021 22:25:50 +0000 (14:25 -0800)]
mixin/polyfill.php - Import. Update comments.

2 years agotools/mixin - Import. Also, update to run within civicrm-core, and add JUnit output.
Tim Otten [Tue, 30 Nov 2021 20:14:10 +0000 (12:14 -0800)]
tools/mixin - Import. Also, update to run within civicrm-core, and add JUnit output.

2 years agotests/extensions/shimmy/ - Import. Also, update comments for LifecycleTest.
Tim Otten [Sat, 27 Nov 2021 23:13:58 +0000 (17:13 -0600)]
tests/extensions/shimmy/ - Import. Also, update comments for LifecycleTest.

2 years agodistmaker - Include `mixin/*` files
Tim Otten [Tue, 30 Nov 2021 22:33:28 +0000 (14:33 -0800)]
distmaker - Include `mixin/*` files

2 years agocivix#175 - Add support for mixins. Use MixinScanner/MixinLoader and boot-cache.
Tim Otten [Tue, 14 Jul 2020 07:29:07 +0000 (00:29 -0700)]
civix#175 - Add support for mixins. Use MixinScanner/MixinLoader and boot-cache.

Overview
--------

(NOTE: For this description, I reference the term "API" in the general sense of a programmatic interface -- such as
a hook or file-naming convention. It is not specifically about CRUD/DB APIs.)

The `civix` code-generator provides support for additional coding-conventions -- ones which are more amenable to
code-generation.  For example, it autoloads files from `xml/Menu/*.xml` and `**/*.mgd.php`.  The technique for
implementing this traditionally relies on generating a lot of boilerplate.

This patch introduces a new construct ("mixin") which allows boilerplate to be maintained more easily.  A mixin
inspects an extension programmatically, registering new hooks as needed.  A mixin may start out as a file in `civix`
(or even as a bespoke file in some module) - and then be migrated into `civicrm-core`. Each mixin has a name and
version, which means that (at runtime) it will only load the mixin once (ie the best-available version).

See: https://github.com/totten/civix/issues/175

Before
------

The civix templates generate a few files, such as `mymod.php` and `mymod.civix.php`.
A typical example looks like this:

```php
// mymod.php - Implement hook_civicrm_xmlMenu
require_once 'mymod.civix.php';
function mymod_civicrm_xmlMenu(&$all, $the, $params) {
  _mymod_civix_civicrm_xmlMenu($all, $the, $params);
}
```

and

```php
// mymod.civix.php - Implement hook_civicrm_xmlMenu
function _mymod_civix_civicrm_xmlMenu(&$all, $the, $params) {
  foreach (_mosaico_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) {
    $files[] = $file;
  }
}
```

These two files are managed differently: `mymod.php` is owned by the developer, and they may add/remove/manage the
hooks in this file.  `mymod.civix.php` is owned by `civix` and must be autogenerated.

This structure allows `civix` (and any `civix`-based extension) to take advantage of new coding-convention
immediately. However, it comes with a few pain-points:

* If you want to write a patch for `_mymod_civix_civicrm_xmlMenu`, the dev-test-loop requires several steps.
* If `civix` needs to add a new `hook_civicrm_foo`, then the author must manually create the stub
  function in `mymod.php`. `civix` has documentation (`UPGRADE.md`) which keeps a long list of stubs that must
  be manually added.
* If `civix` has an update for `_mymod_civix_civicrm_xmlMenu`, then the author must regenerate `mymod.civix.php`.
* If `mymod_civix_xmlMenu` needs a change, then the author must apply it manually.
* If `civix`'s spin on `hook_civicrm_xmlMenu` becomes widespread, then the `xmlMenu` boilerplate is duplicated
  across many extensions.

After
-----

An extension may enable a mixin in `info.xml`, eg:

```xml
<mixins>
  <mixin>civix-register-files@2.0</mixin>
</mixins>
```

Civi will look for a file `mixin/civicrm-register-files@2.0.0.mixin.php` (either in the extension or core). The file follows this pattern:

```php
return function(\CRM_Extension_MixInfo $mixInfo, \CRM_Extension_BootCache $bootCache) {
  // echo "This is " . $mixInfo->longName . "!\n";
  \Civi::dispatcher()->addListener("hook_civicrm_xmlMenu", function($e) use ($mixInfo) {
    ...
  });
}
```

The mixin file is a plain PHP file that can be debugged/copied/edited verbatim, and it can register for hooks on its
own.  The code is no longer a "template", and it doesn't need to be interwoven between `mymod.php` and
`mymod.civix.php`.

It is expected that a system may have multiple copies of a mixin.  It will choose the newest compatible copy.
Hypothetically, if there were a security update or internal API change, core might ship a newer version to supplant the
old copy in any extensions.

Technical Details
-----------------

Mixins may define internal classes/interfaces/functions. However, each major-version
must have a distinct prefix (e.g. `\V2\Mymixin\FooInterface`). Minor-versions may be
provide incremental revisions over the same symbol (but it's imperative for newer
increments to provide the backward-compatibility).

MixinScanner - Make it easier to instantiate and pay with instances

Ex: cv ev '$o=new CRM_Extension_MixinScanner(); var_export($o->createLoader());'

MixinScanner - Enable scanning of `[civicrm.root]/mixin`

2 years agoMerge pull request #22165 from eileenmcnaughton/no_escape
colemanw [Wed, 1 Dec 2021 03:07:21 +0000 (22:07 -0500)]
Merge pull request #22165 from eileenmcnaughton/no_escape

Smarty variables]  Prevent settings form assigned html from being escaped

2 years agoMerge pull request #22197 from totten/master-xdebug3
Tim Otten [Wed, 1 Dec 2021 03:05:52 +0000 (19:05 -0800)]
Merge pull request #22197 from totten/master-xdebug3

DebugSubscriber - Fix test-suite compatibility with XDebug 3

2 years agoMerge pull request #22188 from totten/master-uninstall
Tim Otten [Wed, 1 Dec 2021 03:04:32 +0000 (19:04 -0800)]
Merge pull request #22188 from totten/master-uninstall

ManagedEntities - Fix permission error during uninstallation (regression-fix)

2 years agoMerge pull request #22175 from eileenmcnaughton/smarty3
colemanw [Wed, 1 Dec 2021 01:24:56 +0000 (20:24 -0500)]
Merge pull request #22175 from eileenmcnaughton/smarty3

[Smarty variable][Civicase] remove isset

2 years agoMerge pull request #22180 from eileenmcnaughton/smarty7
colemanw [Wed, 1 Dec 2021 01:24:20 +0000 (20:24 -0500)]
Merge pull request #22180 from eileenmcnaughton/smarty7

Remove issets from Activity search screen

2 years agoMerge pull request #22172 from eileenmcnaughton/smarty
colemanw [Wed, 1 Dec 2021 01:22:30 +0000 (20:22 -0500)]
Merge pull request #22172 from eileenmcnaughton/smarty

Avoid default escaping for blog titles

2 years agoMerge pull request #22174 from eileenmcnaughton/smarty2
colemanw [Wed, 1 Dec 2021 01:20:22 +0000 (20:20 -0500)]
Merge pull request #22174 from eileenmcnaughton/smarty2

Remove isset checks on isForm

2 years agoMerge pull request #22184 from eileenmcnaughton/smarty10
colemanw [Wed, 1 Dec 2021 01:19:44 +0000 (20:19 -0500)]
Merge pull request #22184 from eileenmcnaughton/smarty10

[Smarty variables] Remove isset from add new group form

2 years agoFix contribution tab to work with escape by default
Eileen McNaughton [Tue, 30 Nov 2021 20:36:28 +0000 (09:36 +1300)]
Fix contribution tab to work with escape by default

This removes some isset that affect contact contribution tab if escape on output is enabled.

This might regress some smarty e-notices. I think if tests pass that is OK at this stage
as we never eliminted them & getting to security enablable seems like a higher priority

2 years agoMerge pull request #22164 from eileenmcnaughton/parent
colemanw [Wed, 1 Dec 2021 00:04:00 +0000 (19:04 -0500)]
Merge pull request #22164 from eileenmcnaughton/parent

Remove empty check previously commented to be meaningless

2 years agoDebugSubscriber - Fix compatibility with XDebug 2/3
Tim Otten [Tue, 30 Nov 2021 23:54:41 +0000 (15:54 -0800)]
DebugSubscriber - Fix compatibility with XDebug 2/3

2 years agoMerge pull request #22178 from demeritcowboy/custom-null
Eileen McNaughton [Tue, 30 Nov 2021 23:27:55 +0000 (12:27 +1300)]
Merge pull request #22178 from demeritcowboy/custom-null

dev/core#2973 - All custom fields broken on edit forms

2 years ago[Smarty variables] The last isset....
Eileen McNaughton [Tue, 30 Nov 2021 23:22:20 +0000 (12:22 +1300)]
[Smarty variables] The last isset....

civicrm/report/list?reset=1

2 years agoMerge pull request #22081 from colemanw/searchKitSortable
demeritcowboy [Tue, 30 Nov 2021 22:30:25 +0000 (17:30 -0500)]
Merge pull request #22081 from colemanw/searchKitSortable

SearchKit - Add drag-sortable weight functionality

2 years ago[Smarty variables - remove isset
Eileen McNaughton [Tue, 30 Nov 2021 21:30:50 +0000 (10:30 +1300)]
[Smarty variables - remove isset

2 years agoManagedEntities - Fix permission error during uninstallation (regression-fix)
Tim Otten [Tue, 30 Nov 2021 21:47:17 +0000 (13:47 -0800)]
ManagedEntities - Fix permission error during uninstallation (regression-fix)

Overview
--------

Fixes a recent regression that prevents you from uninstalling extensions via
CLI.  This specifically affects extensions which use managed entities.

Steps to reproduce
------------------

```
cv en afform
cv dis afform
cv ext:uninstall afform
```

Before
-------

```
[bknix-max:~/bknix/build/dmaster/web/sites/all/modules/civicrm] cv en afform && cv dis afform && cv ext:uninstall afform
Enabling extension "org.civicrm.afform"
Disabling extension "org.civicrm.afform"
Uninstalling extension "org.civicrm.afform"
Error: API Call Failed: Array
(
    [entity] => Extension
    [action] => uninstall
    [params] => Array
        (
            [keys] => Array
                (
                    [0] => org.civicrm.afform
                )

            [debug] => 1
            [version] => 3
        )

    [result] => Array
        (
            [error_code] => unauthorized
            [entity] => Extension
            [action] => uninstall
            [trace] => #0 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(147): Civi\API\Kernel->authorize(Object(Civi\Api4\Provider\ActionObjectProvider), Object(Civi\Api4\Generic\DAODeleteAction))
 #1 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAODeleteAction))
 #2 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
 #3 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(467): civicrm_api4('OptionValue', 'delete', Array)
 #4 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(303): CRM_Core_ManagedEntities->removeStaleEntity(Object(CRM_Core_DAO_Managed))
 #5 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(134): CRM_Core_ManagedEntities->reconcileUnknownModules()
 #6 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(409): CRM_Core_ManagedEntities->reconcile()
 #7 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager.php(483): CRM_Core_Invoke::rebuildMenuAndCaches(true)
 #8 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/api/v3/Extension.php(183): CRM_Extension_Manager->uninstall(Array)
 #9 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_uninstall(Array)
 #10 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
 #11 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest(Array)
 #12 /home/me/bknix/build/dmaster/web/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe('Extension', 'uninstall', Array)
 #13 phar:///home/me/bknix/bin/cv/src/Command/BaseCommand.php(49): civicrm_api('Extension', 'uninstall', Array)
 #14 phar:///home/me/bknix/bin/cv/src/Command/ExtensionUninstallCommand.php(63): Civi\Cv\Command\BaseCommand->callApiSuccess(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'Extension', 'uninstall', Array)
 #15 phar:///home/me/bknix/bin/cv/vendor/symfony/console/Command/Command.php(257): Civi\Cv\Command\ExtensionUninstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 #16 phar:///home/me/bknix/bin/cv/vendor/symfony/console/Application.php(850): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 #17 phar:///home/me/bknix/bin/cv/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Civi\Cv\Command\ExtensionUninstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 #18 phar:///home/me/bknix/bin/cv/src/Application.php(46): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 #19 phar:///home/me/bknix/bin/cv/vendor/symfony/console/Application.php(124): Civi\Cv\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 #20 phar:///home/me/bknix/bin/cv/src/Application.php(15): Symfony\Component\Console\Application->run()
 #21 phar:///home/me/bknix/bin/cv/bin/cv(27): Civi\Cv\Application::main('phar:///Users/t...')
 #22 /home/me/bknix/bin/cv(14): require('phar:///Users/t...')
 #23 {main}
            [is_error] => 1
            [error_message] => Authorization failed
        )

)
```

After
-----

Works

Comment
-------

I encountered this while working on E2E test-coverage for other changes.
The E2E test coverage had worked on a previous iteration of 5.45.alpha1 but
failed when I rebased. Consequently, this means

You can see a prior draft of the E2E test [here](https://github.com/totten/shimmy/blob/master-reorg/shimmy/tests/phpunit/E2E/Shimmy/LifecycleTest.php#L56-L77).
However, it's being reworked as a core patch.

I'd suggest accepting this without a test - because (a) it's a regression and (b) there will be coverage from the pending change.

2 years agoRemove isset from add new group form
Eileen McNaughton [Tue, 30 Nov 2021 21:27:26 +0000 (10:27 +1300)]
Remove isset from add new group form

civicrm/group/add?reset=1

2 years agoRemove another isset
Eileen McNaughton [Tue, 30 Nov 2021 20:53:40 +0000 (09:53 +1300)]
Remove another isset

2 years agoRemove issets from Activity search screen
Eileen McNaughton [Tue, 30 Nov 2021 20:41:39 +0000 (09:41 +1300)]
Remove issets from Activity search screen

This will regress enotices - but I think it's an OK trade off at this stage to try to squeeze out a few more issets
while most people can't see those notices anyway

2 years agofix custom fields
demeritcowboy [Tue, 30 Nov 2021 20:26:11 +0000 (15:26 -0500)]
fix custom fields

2 years ago[Smarty variable][Civicase] remove isset
Eileen McNaughton [Tue, 30 Nov 2021 20:03:42 +0000 (09:03 +1300)]
[Smarty variable][Civicase] remove isset

Affects civicrm/case?reset=1 when cases exist

2 years agoRemove isset checks on isForm
Eileen McNaughton [Tue, 30 Nov 2021 19:59:18 +0000 (08:59 +1300)]
Remove isset checks on isForm

We are now assigning these from Core_Page so they should be set. If we do get
an enotice back from this then as long as it passes tests it will
be the lesser evil & picked up later

2 years agoAPIv4 - Add fixes & tests for domain-specific managed entities
Coleman Watts [Tue, 30 Nov 2021 19:53:04 +0000 (14:53 -0500)]
APIv4 - Add fixes & tests for domain-specific managed entities

2 years agoAvoid default escaping for blog titles
Eileen McNaughton [Tue, 30 Nov 2021 19:48:58 +0000 (08:48 +1300)]
Avoid default escaping for blog titles

These have escaping - but we dont want the html to be escaped because it messed with Karin's emojis :-)

2 years agoMerge pull request #21232 from colemanw/APIDelete
Eileen McNaughton [Tue, 30 Nov 2021 19:40:13 +0000 (08:40 +1300)]
Merge pull request #21232 from colemanw/APIDelete

APIv4 - Use correct BAO delete function (fixes dev/core#2757)

2 years agoMerge pull request #22171 from civicrm/5.44
colemanw [Tue, 30 Nov 2021 18:56:44 +0000 (13:56 -0500)]
Merge pull request #22171 from civicrm/5.44

5.44

2 years agoMerge pull request #22170 from colemanw/fixSearchKitOptions
colemanw [Tue, 30 Nov 2021 18:55:42 +0000 (13:55 -0500)]
Merge pull request #22170 from colemanw/fixSearchKitOptions

SearchKit - Fix regression for pseudoconstant selection

2 years agoAPIv4 - Add useTrash option to soft-delete contacts
Coleman Watts [Sun, 29 Aug 2021 16:17:05 +0000 (12:17 -0400)]
APIv4 - Add useTrash option to soft-delete contacts

This sets Contact::delete to move contacts to the trash by default.

2 years agoAPIv4 - Use correct BAO delete function
Coleman Watts [Mon, 23 Aug 2021 21:40:35 +0000 (17:40 -0400)]
APIv4 - Use correct BAO delete function

Uses BAO::del() only if it isn't deprecated.

2 years agoSearchKit - Fix regression for pseudoconstant selection
Coleman Watts [Tue, 30 Nov 2021 17:02:47 +0000 (12:02 -0500)]
SearchKit - Fix regression for pseudoconstant selection

Fixes dev/report#83

2 years agoSearchKit - Add drag-sortable weight functionality
Coleman Watts [Mon, 15 Nov 2021 14:47:37 +0000 (09:47 -0500)]
SearchKit - Add drag-sortable weight functionality

Drag-sortable weights are similar to in-place edit in that it uses the API
to update records in the table. In this case it updates the "weight" column when
the user drags a row into a different position.

2 years agoMerge pull request #22169 from demeritcowboy/oauth-dropdown
colemanw [Tue, 30 Nov 2021 14:28:28 +0000 (09:28 -0500)]
Merge pull request #22169 from demeritcowboy/oauth-dropdown

dev/mail#105 - Oauth dropdown missing on mail settings form

2 years agoMerge pull request #22161 from eileenmcnaughton/pay_test2
demeritcowboy [Tue, 30 Nov 2021 13:26:04 +0000 (08:26 -0500)]
Merge pull request #22161 from eileenmcnaughton/pay_test2

Fix more tests to use full flow

2 years agoMerge pull request #22143 from mattwire/statuspagehigherfirst
demeritcowboy [Tue, 30 Nov 2021 13:21:31 +0000 (08:21 -0500)]
Merge pull request #22143 from mattwire/statuspagehigherfirst

Display higher severity status checks first

2 years agoMerge pull request #22142 from mattwire/envokextensionsnatcase
Yashodha Chaku [Tue, 30 Nov 2021 07:52:59 +0000 (13:22 +0530)]
Merge pull request #22142 from mattwire/envokextensionsnatcase

Sort list of extensions alphabetically in 'Extensions ok' check

2 years agoMerge pull request #22168 from demeritcowboy/useajax
Seamus Lee [Tue, 30 Nov 2021 04:28:26 +0000 (15:28 +1100)]
Merge pull request #22168 from demeritcowboy/useajax

Fix broken extension page smarty assignment

2 years agoMerge pull request #22167 from eileenmcnaughton/location_tpl
Seamus Lee [Tue, 30 Nov 2021 04:28:16 +0000 (15:28 +1100)]
Merge pull request #22167 from eileenmcnaughton/location_tpl

[Smarty Variables] Remove isset from location type form