Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-04-12T07:26:10Zhttps://lab.civicrm.org/dev/core/-/issues/4224DB error message when creating new campaign with existing "External ID"2023-04-12T07:26:10ZDetlev SieberDB error message when creating new campaign with existing "External ID"Overview
----------------------------------------
When creating a new campaign, an external_id can be added. This external_id must be unique.
However, when a new campaign is entered with an external_id that already exists in the databas...Overview
----------------------------------------
When creating a new campaign, an external_id can be added. This external_id must be unique.
However, when a new campaign is entered with an external_id that already exists in the database, there is no error message giving the chance to enter another external_id, but we receive a database error:
```
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: already exists
```
Reproduction steps
----------------------------------------
1. Create a new campaign with External ID "10001"
2. Create another new campaign with another name but with the same External ID "10001"
3. Database error is displayed, leaving thu user puzzled.
Current behaviour
----------------------------------------
Database error, that gives the user no clue what happened.
Expected behaviour
----------------------------------------
There should be a message stating "External ID already exists", giving the user the chance to enter another external ID (or leave the field empty).
Environment information
----------------------------------------
* __CiviCRM:_Master/5.59.xhttps://lab.civicrm.org/dev/core/-/issues/4223To edit price sets CiviContribute access needed2023-04-12T07:25:37ZMariaVTo edit price sets CiviContribute access neededOverview
----------------------------------------
A user has limited permissions without access to CiviContribute but has access to CiviEvent and needs to set up price sets. It is possible to view price sets but they can not be edited or...Overview
----------------------------------------
A user has limited permissions without access to CiviContribute but has access to CiviEvent and needs to set up price sets. It is possible to view price sets but they can not be edited or created because of the financial type.
Reproduction steps
----------------------------------------
1. Create price set for Events (with a user without CiviContribute access)
2. Create price field (radio buttons)
3. Add options to this price field
4. Fill all needed information
5. Save
6. Error "financial type is mandatory"
Current behaviour
----------------------------------------
When I open a price set option it shows me this:
![image](/uploads/f5b1e1b6648bb6beb30cf36b3ab2fe7a/image.png)
(Zuwendungsart = financial type)
With administrator this:
![image](/uploads/b6fc64b239dad54bbf4ba68c72434241/image.png)
If I give "CiviContribute access" it works.
Expected behaviour
----------------------------------------
When CiviEvent access is given, users are allowed to create price sets.
Environment information
----------------------------------------
* __CiviCRM:__ _5.58.1
* __CMS:__ _Drupal 7https://lab.civicrm.org/dev/core/-/issues/4219Temp table column too short in legacycustomsearches2023-04-12T07:19:23ZcatorghansTemp table column too short in legacycustomsearchesI got a "DB Error: unknown error" in "Rebuild Smart Group Cache" in the Scheduled Jobs.
In the Log file it says
"[nativecode=1406 ** Data too long for column 'group_names' at row 1]"
Which started "civicrm/ext/legacycustomsearches/CRM/C...I got a "DB Error: unknown error" in "Rebuild Smart Group Cache" in the Scheduled Jobs.
In the Log file it says
"[nativecode=1406 ** Data too long for column 'group_names' at row 1]"
Which started "civicrm/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Group.php(435)"
What happens there just above is:
```
$this->_iGTable->createWithColumns("id int PRIMARY KEY AUTO_INCREMENT, contact_id int, group_names varchar(64)");
if ($iGroups) {
$includeGroup = "INSERT INTO {$this->_iGTableName} (contact_id, group_names)
SELECT civicrm_contact.id as contact_id, civicrm_group.title as group_name
FROM civicrm_contact
INNER JOIN civicrm_group_contact
ON civicrm_group_contact.contact_id = civicrm_contact.id
LEFT JOIN civicrm_group
ON civicrm_group_contact.group_id = civicrm_group.id";
}
```
The issue is that civicrm_group.title is varchar(255) while group_names in this temp table is varchar(64).
We had one group title which was 77 chars. When I shortened it, it worked again.
So make it "group_names varchar(255)" and it should work (or use civicrm_group.name in the select, but I suspect a reason why that was not used here)https://lab.civicrm.org/dev/core/-/issues/1905Add configure and priceset url icons on public contribution & event pages2023-04-12T05:03:21ZjitendraAdd configure and priceset url icons on public contribution & event pagesfrom https://chat.civicrm.org/civicrm/pl/n3dzdtp9mf875kjzxc5pk3xmhh
Add configure and priceset icons to public contribution & event pagesfrom https://chat.civicrm.org/civicrm/pl/n3dzdtp9mf875kjzxc5pk3xmhh
Add configure and priceset icons to public contribution & event pagesjitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/1802Relationship count does not match displayed relationships2023-04-12T05:03:20ZedvanleeuwenRelationship count does not match displayed relationshipsOverview
----------------------------------------
When a contact has a an active relationship with another contact, this is displayed as a number on the Relationship tab.
However, when the current user does not have rights to view the ot...Overview
----------------------------------------
When a contact has a an active relationship with another contact, this is displayed as a number on the Relationship tab.
However, when the current user does not have rights to view the other contact, the relationship is not displayed.
![Aantekening_2020-06-07_114321](/uploads/acaa24e68e65b688864dd3509dd07314/Aantekening_2020-06-07_114321.jpg)
Example use-case
----------------------------------------
1. As an admin: add a relationship with a contact to another contact (e.g. an organization) with limited access.
Current behaviour
----------------------------------------
1. Go to the contact as admin: see all relationships.
1. Go to the contact as limited user and only see the relationships the limited user has access to.
Proposed behaviour
----------------------------------------
1. My suggestion: I would like to see the relationship with the other contact, without being able to change or drill-down to the contact's details.
2. Other suggestion: fix the number on the Relationship tab.
Comments
----------------------------------------
None.https://lab.civicrm.org/dev/core/-/issues/4228EntityRef to Contact throws fatal error2023-04-11T16:56:48ZbrienneEntityRef to Contact throws fatal errorOverview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into an error specially when the Entity being referenced is *Contact*. While you can create the custom fie...Overview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into an error specially when the Entity being referenced is *Contact*. While you can create the custom field, when you try to add a value to that EntityRef, say on a Contribution, and submit it, a fatal error is thrown.
Reproduction steps
----------------------------------------
*Note that I'm using a custom group to be used on Contributions*
1. Create a custom field of type *EntityRef* and select *Contact* as the Entity
1. Click **Contributions > New Contribution**
1. Fill out the Contribution required fields, and select a Contact for the EntityRef custom field
1. Click **Save**
1. Got an error: "**One of parameters (value: ) is not of the type Integer**".
Current behaviour
----------------------------------------
A user cannot actually use a created EntityRef custom field if the entity being referenced is a Contact.
Note that this behavior does not happen with other entities, such as Event or Activity
Expected behaviour
----------------------------------------
A user should be able to used EntityRef custom field to a Contact without a fatal error.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.61.alpha1
Comments
----------------------------------------
Error details and backtrace from the ConfigAndLog file
```
$Fatal Error Details = array:3 [
"message" => "One of parameters (value: ) is not of the type Integer"
"code" => null
"exception" => CRM_Core_Exception {#1848
-errorData: array:1 [
"error_code" => 0
]
#cause: null
-_trace: null
#message: "One of parameters (value: ) is not of the type Integer"
#code: 0
#file: "/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Utils/Type.php"
#line: 471
trace: {
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Utils/Type.php:471 {
› $data = htmlentities($data ?? 'NULL');
› throw new CRM_Core_Exception("$name (value: $data) is not of the type $type");
› }
}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/DAO.php:1763 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/DAO.php:1643 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/BAO/CustomValueTable.php:275 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/BAO/CustomValueTable.php:403 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php:233 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php:481 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php:1792 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php:976 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Form.php:578 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php:409 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php:463 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:319 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/drupal/civicrm.module:471 { …}
/buildkit/build/dmain/web/includes/menu.inc:527 { …}
/buildkit/build/dmain/web/index.php:21 { …}
}
}
]
```https://lab.civicrm.org/dev/core/-/issues/4100Add setting to disable Smarty in Scheduled reminders2023-04-11T12:40:41ZMichael McAndrewAdd setting to disable Smarty in Scheduled remindersUntil now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/exten...Until now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/extensions/mosaico-message-templates extension). It causes a fatal error when sending the messages which may not be detected and may cause other scheduled jobs to fail.
We could fix this by turning it off but some sites may want to preserve the current behaviour (those who actually use Smarty in their scheduled reminders - we don't now how many of these exist but we presume that they are in the minority - see https://github.com/civicrm/civicrm-core/pull/15436#issuecomment-541923948 for a discussion of why Smarty was enabled originally).
So we:
1. add a new setting `scheduled_reminder_smarty` which by default is null, i.e. we disable this feature for new sites.
2. enable this feature during the upgrade to preserve the existing behaviour
3. let people know they we might want to turn it off in a post upgrade message
We should also consider mentioning this in the https://civicrm.org/extensions/mosaico-message-templates documentation.
See https://github.com/civicrm/civicrm-core/pull/15436 and https://lab.civicrm.org/dev/core/-/issues/58 for relevant background.5.60.0https://lab.civicrm.org/dev/core/-/issues/750The following PHP variables are not set: $_SERVER[HTTP_HOST]2023-04-11T05:03:21ZYepaThe following PHP variables are not set: $_SERVER[HTTP_HOST]### The error
```drush updb
[error] The following PHP variables are not set: $_SERVER[HTTP_HOST]
Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
```
### Steps to reproduce
* Launch the command ```drush u...### The error
```drush updb
[error] The following PHP variables are not set: $_SERVER[HTTP_HOST]
Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
```
### Steps to reproduce
* Launch the command ```drush updb```
### Versions
* Drupal : 8.6.10
* Drush : 9.5.2
* CiviCRM : 5.10.3
### Related to
* https://github.com/drush-ops/drush/issues/3562https://lab.civicrm.org/dev/core/-/issues/1925Sortable select2 settings2023-04-11T05:03:20ZeileenSortable select2 settingsI want to make a setting Select2+ sortable (in an extension in this case). We enable that for checkboxes (as used by advanced search) - I think it would be good to broaden this - but not too sure how. If it's just adding a class I can't ...I want to make a setting Select2+ sortable (in an extension in this case). We enable that for checkboxes (as used by advanced search) - I think it would be good to broaden this - but not too sure how. If it's just adding a class I can't find it
@colemanw this is mostly a question for you in the first instancehttps://lab.civicrm.org/dev/core/-/issues/1896Add "All Contacts" link to the Contacts menu on new installs.2023-04-10T05:03:15ZhomotechsualAdd "All Contacts" link to the Contacts menu on new installs.Overview
----------------------------------------
_Currently viewing a list of your contacts is a two or three step process - load a search page, then click search. We can do this with link to `civicrm/contact/search?force=true`. For a b...Overview
----------------------------------------
_Currently viewing a list of your contacts is a two or three step process - load a search page, then click search. We can do this with link to `civicrm/contact/search?force=true`. For a better out-of-the-box experience it would be good to have this as a default link to `All Contacts` in the `Contacts` menu._
Example use-case
----------------------------------------
1. Click on **Contacts -> All Contacts**.
1. A pre-populated list of all contacts is available without needing to create a custom Navigation Menu entry.
Comments
----------------------------------------
_Discussion on MatterMost: https://chat.civicrm.org/civicrm/pl/zb5e6g8neibotqbp3g34iz3esa. If the issue here gets traction I'm happy to raise the PR myself._https://lab.civicrm.org/dev/core/-/issues/1906Allow Failed -> Completed status for contributions2023-04-10T05:03:14ZjitendraAllow Failed -> Completed status for contributionsfrom https://chat.civicrm.org/civicrm/pl/iqwg9chm4pgq9gd57sb3q5h49y
Example workflow / use-case:
1. Contribution is created in pending (eg. Recurring contribution using Stripe via contribution page and card number: 4000000000000341 - s...from https://chat.civicrm.org/civicrm/pl/iqwg9chm4pgq9gd57sb3q5h49y
Example workflow / use-case:
1. Contribution is created in pending (eg. Recurring contribution using Stripe via contribution page and card number: 4000000000000341 - see https://stripe.com/docs/testing#cards-responses).
2. IPN returns "Failed" and API3 Contribution.create is called with status=Failed.
3. Later an IPN returns "Success" and API3 Payment.create is called with status=Completed.
Currently, step 3 fails because Failed->Completed is not allowed for contributions.jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/1779Documentation Query: Profile edit bounces to Home Page if user has insufficie...2023-04-09T05:03:30ZkcristianoDocumentation Query: Profile edit bounces to Home Page if user has insufficient permissionsStarting in Version 5.23 this [PR](https://github.com/civicrm/civicrm-core/pull/15770) changed behavior of what will happen if a profile page (amongst other items) is accessed without the proper permissions.
In recent profile testing if...Starting in Version 5.23 this [PR](https://github.com/civicrm/civicrm-core/pull/15770) changed behavior of what will happen if a profile page (amongst other items) is accessed without the proper permissions.
In recent profile testing if a user goes to a Profile Edit page and either does not have proper permissions (not logged in, invalid token) the page does not load, it does not give them an error it merely bounces toi the home page.
To reproduce go to : https://dmaster.demo.civicrm.org/civicrm/profile/edit?gid=1&reset=1 as an anonymous user. You will end up on the home page and will not receive any notices.
While this is better than a fatal error, it can be unexpected. Reviewing this [doc page](https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/) Do we need to be clearer on this affect and what a user will experience?
@MikeyMJCO what do you think?https://lab.civicrm.org/dev/core/-/issues/1904iCal files not generated for not public events2023-04-09T05:03:29ZalicefruminiCal files not generated for not public eventsOverview
----------------------------------------
If an event is NOT public:
1. the Event Info page does not show a link to a calendar file.
2. If you go to the link to download the calendar file (drupal url ex: https://dmaster.demo.civi...Overview
----------------------------------------
If an event is NOT public:
1. the Event Info page does not show a link to a calendar file.
2. If you go to the link to download the calendar file (drupal url ex: https://dmaster.demo.civicrm.org/civicrm/event/ical?reset=1&id={eventID}&list=1) the ical file is not properly populated.
Reproduction steps
----------------------------------------
1. Create an Event
1. Set "Public Event?" to unchecked
3. Go to the event info page for that event
Current behaviour
----------------------------------------
+ No calendar icon to download the .ics file.
+ if you go to the link that generates the ics file it is not properly populated
![notpublic](/uploads/e2489ad1b44e94aa8edbd5e3e673ccb8/notpublic.png)
Expected behaviour
----------------------------------------
+ The calendar icon to download the .ics file should appear as it does for public events.
+ if you go to the link that generates the ics file it should populate as it does for public events
![public](/uploads/677c0fac8c5b7bdaf656e8d2fded0cdd/public.png)
Environment information
----------------------------------------
Tested on master (5.29alpha1) in WordPress and Drupal
Comments
----------------------------------------
I suspect this is an oversight.https://lab.civicrm.org/dev/core/-/issues/1542Force urls for case tagset searches don't fill in the field on the search form2023-04-08T19:12:10ZDaveDForce urls for case tagset searches don't fill in the field on the search formI'm not sure this ever worked since I think it was part of the slew of changes for force url searches. The search itself works, but the field on the form doesn't get filled in. It works as expected for bare case tags, just not case tagse...I'm not sure this ever worked since I think it was part of the slew of changes for force url searches. The search itself works, but the field on the form doesn't get filled in. It works as expected for bare case tags, just not case tagsets.
1. Add a tagset for cases with some tags in it. (Not a bare tag, but a tag set.)
2. Create some cases that use it. Or not - it doesn't really matter to show what's wrong on the form, just if you wanted to see that the search itself is working.
3. Visit a url like https://dmaster.demo.civicrm.org/civicrm/case/search?reset=1&force=1&case_tags=4, where 4 is the id of one of the tags you created.
4. On the search form, you'd expect to see the tagset field filled in with the search parameter value but it's blank. The wordy output and results are correct.https://lab.civicrm.org/dev/core/-/issues/1908Add new hook preIPNProcess2023-04-08T05:03:26ZalicefruminAdd new hook preIPNProcessOverview
----------------------------------------
Adds a hook preIPNProcess which allows one to edit IPN data before it is processed in CiviCRM.
As a complement to the postIPNProcess hook (which it looks like was originally designed to ...Overview
----------------------------------------
Adds a hook preIPNProcess which allows one to edit IPN data before it is processed in CiviCRM.
As a complement to the postIPNProcess hook (which it looks like was originally designed to be "alterIPNData" https://github.com/civicrm/civicrm-core/pull/12928 and work like this one)
Example use-case
----------------------------------------
1. Altering data sent from the processor before CiviCRM processes it, If the data is not processed correctly postIPNProcess is never called, preIPNProcess needs to be used when the data needs to be fixed up in order for it to process successfully
Current behaviour
----------------------------------------
No way for extension developers to alter IPN data before CiviCRM Processing
Proposed behaviour
----------------------------------------
Hook that allows extension developers to alter IPN data bore CiviCRM processes ithttps://lab.civicrm.org/dev/core/-/issues/3571OAUTH2 account creation broken2023-04-07T13:52:55ZDaveDOAUTH2 account creation brokenhttps://civicrm.stackexchange.com/questions/40773/cant-add-gmail-account-with-oauth
On the mail accounts page there's no add dropdown just the usual regular add button.
PR cominghttps://civicrm.stackexchange.com/questions/40773/cant-add-gmail-account-with-oauth
On the mail accounts page there's no add dropdown just the usual regular add button.
PR coming5.44.0https://lab.civicrm.org/dev/core/-/issues/1893CiviMail "reply to confirm email subscription" feature is undocumented and br...2023-04-07T05:03:22ZjptillmanCiviMail "reply to confirm email subscription" feature is undocumented and brokenOverview
----------------------------------------
When you perform the very basic Civi function of signing up for a public mailing list via /civicrm/mailing/subscribe, the email confirmation mentions that you can "Reply to this email" an...Overview
----------------------------------------
When you perform the very basic Civi function of signing up for a public mailing list via /civicrm/mailing/subscribe, the email confirmation mentions that you can "Reply to this email" and inserts what appears to be a VERP'ed reply-to address.
There is no mention of this in the docs anywhere that I can find. The only thing the docs mention in setup is handling bounces and email-to-event. It never mentions that this function exists or needs set-up.
I don't have VERP enabled in my current setup (nor do I have any bounce processing enabled) and it just inserts that non-working reply-to address without warning or fanfare. If I hadn't actually taken the time to read the email instead of just clicking the alternative "Confirm" link, I would never have realized what was happening.
This is either a documentation bug or a semi-broken feature that has become stale. Either way, it's a tripwire for anyone new trying to set up mailing list subscriptions.
I've tried posting a query about this to MatterMost twice but it was ignored both times.
Reproduction steps
----------------------------------------
1. Visit /civicrm/mailing/subscribe on any drupal/civi site with a properly configured mailing list and where the outgoing email template hasn't been amended.
1. Sign up for a mailing list
Current behaviour
----------------------------------------
1. You'll get the email that contains the phrase "reply to this email"
1. Prepare a reply to the email and you'll see the munged email address -- this will occur even if VERP is disabled in the settings
1. The site admin will have no idea this happens unless they've been bitten by it before or have taken the time to trigger the email as a test and have carefully read the text of the email.
Expected behaviour
----------------------------------------
The site admin should know how to configure this by reading the docs (or at least that it's going to happen so they can fix the outgoing email template).
--OR--
the "reply to this message" verbiage and the munged email address should not be used.https://lab.civicrm.org/dev/core/-/issues/1900Test issue to check Gitlab and GitHub Integration2023-04-07T05:03:21Zkartik1000Test issue to check Gitlab and GitHub IntegrationThis is a test issue to test some work done based on GitLab and GitHub Integration. You can clearly ignore this. Thanks!This is a test issue to test some work done based on GitLab and GitHub Integration. You can clearly ignore this. Thanks!https://lab.civicrm.org/dev/core/-/issues/1898Test support for extensions2023-04-06T05:03:35ZeileenTest support for extensionsIn CiviCRM core test class we have a function createLogggedInnser to emulated having a logged in user
When running extension tests
a) this function is not available and
b) the UFClass is Drupal not Tests - which causes problems running ...In CiviCRM core test class we have a function createLogggedInnser to emulated having a logged in user
When running extension tests
a) this function is not available and
b) the UFClass is Drupal not Tests - which causes problems running tests.
We have a function like this in our test class.
```
/**
* Emulate a logged in user since certain functions use that.
* value to store a record in the DB (like activity)
* CRM-8180
*
* @return int
* Contact ID of the created user.
*/
public function imitateAdminUser() {
$result = $this->callAPISuccess('UFMatch', 'get', array(
'uf_id' => 1,
'sequential' => 1,
));
if (empty($result['id'])) {
$contact = $this->callAPISuccess('Contact', 'create', array(
'first_name' => 'Super',
'last_name' => 'Duper',
'contact_type' => 'Individual',
'api.UFMatch.create' => array('uf_id' => 1, 'uf_name' => 'Wizard'),
));
$contactID = $contact['id'];
}
else {
$contactID = $result['values'][0]['contact_id'];
}
$session = CRM_Core_Session::singleton();
$session->set('userID', $contactID);
CRM_Core_Config::singleton()->userPermissionClass = new CRM_Core_Permission_UnitTests();
CRM_Core_Config::singleton()->userPermissionClass->permissions = array(
'edit all contacts',
'Access CiviCRM',
'Administer CiviCRM',
);
return $contactID;
}
```
I wonder about either
1) providing some civix support or
2) adding a new test trait \Civi\Test\UserTrait with
- createLoggedInUser
- something like the above
- move some of the stuff from the unavailable permission trait
ping @tottenhttps://lab.civicrm.org/dev/core/-/issues/1112Require less permission for contribution page management2023-04-06T05:03:35ZJKingsnorthRequire less permission for contribution page managementCurrently a user needs a very high level of permissions in order to manage contribution pages on the website; contrary to the approach used in CiviEvent.
In order to manage events in CiviCRM, the permission 'access CiviEvent' is used.
...Currently a user needs a very high level of permissions in order to manage contribution pages on the website; contrary to the approach used in CiviEvent.
In order to manage events in CiviCRM, the permission 'access CiviEvent' is used.
In order to manage contribution pages in CiviCRM, the permissions access CiviContribute AND administer CiviCRM are required.
I suggest we either:
* Make the permission just access CiviContribute (and add this to the admin/price paths)
* Add a new permission for 'manage contribution pages' with access to the civicrm/admin/contribute* paths (and the admin/price paths)
The first option will make CiviContribute behave more like CiviEvent - giving access to create the contribution pages, but not all the admin functions like managing custom fields and profiles.