Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-08-25T20:05:21Zhttps://lab.civicrm.org/dev/joomla/-/issues/49CIVI CRM Menu does not show output when SEF is ON - Joomlai2023-08-25T20:05:21ZjoomCIVI CRM Menu does not show output when SEF is ON - JoomlaiHi
i updated the website to Joomla 4 and also updated CIVI to latest version and
PHP to PHP 8.
all seems fine on updates but on frontend no CIVI CRM menu item is showing any output with Joomla 4.
If i use system URL it works fine.
No ch...Hi
i updated the website to Joomla 4 and also updated CIVI to latest version and
PHP to PHP 8.
all seems fine on updates but on frontend no CIVI CRM menu item is showing any output with Joomla 4.
If i use system URL it works fine.
No change if i downgrade PHP version and turn off mod rewrite as well.
With SEF OFF or if copy the menu system URL its works fine **/index.php?option=com_civicrm&view=Dashboard&task=civicrm/user&reset=1&itemid=294**![Screenshot_3](/uploads/672b1f3257e0a6f17963cbbf1f964b59/Screenshot_3.png)https://lab.civicrm.org/dev/core/-/issues/4226Mapping.mapping_id does not resolve in api v4 explorer2023-04-12T07:28:35ZeileenMapping.mapping_id does not resolve in api v4 explorer@colemanw what is the right approach here - there is a foreign key - but civicrm_mapping only has name, not label etc -(I kinda see this table being deprecated over time too)
![image](/uploads/618ea8286b9b6792ccad8de319ff311f/image.png)...@colemanw what is the right approach here - there is a foreign key - but civicrm_mapping only has name, not label etc -(I kinda see this table being deprecated over time too)
![image](/uploads/618ea8286b9b6792ccad8de319ff311f/image.png)
```
<field>
<name>mapping_id</name>
<type>int unsigned</type>
<title>Mapping ID</title>
<required>true</required>
<comment>Mapping to which this field belongs</comment>
<html>
<label>Mapping</label>
</html>
<add>1.2</add>
</field>
<foreignKey>
<name>mapping_id</name>
<table>civicrm_mapping</table>
<key>id</key>
<add>1.2</add>
<onDelete>CASCADE</onDelete>
</foreignKey>
```https://lab.civicrm.org/dev/core/-/issues/4230Some times custom fields data are set from wrong contact2023-04-12T07:30:30ZPradeep Nayakpradpnayak@gmail.comSome times custom fields data are set from wrong contactOn membership signup form on page load by default custom field are set with wrong data i.e from a different contact. This has raised big concern for our clients as their confidential data are exposed to others.
This happens when the mem...On membership signup form on page load by default custom field are set with wrong data i.e from a different contact. This has raised big concern for our clients as their confidential data are exposed to others.
This happens when the membership id for the [contact is used as contact id to fetch the detail](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L285)s.
Steps to replicate on dmaster:
1. Create a custom field for a contact, add to profile and include the profile on membership signup/renewal form.
2. [Find membership](https://dmaster.demo.civicrm.org/civicrm/member/search?reset=1)
3. Look for any contact Smith, Rodrigo. Check for contact id and membership id for the contact. For now the cid=75 and mid=11
4. Edit the contact cid=11 and update the custom field created at step 1.
5. visit the membership renewal/signup form for cid=75 https://dmaster.demo.civicrm.org/civicrm/contribute/transact?cid=75&reset=1&id=2
Actual result:
Custom field is populated for cid=11 instead cid=75
Expected result:
Custom field is populated for cid=75https://lab.civicrm.org/dev/core/-/issues/4231Contact Import will not accept State/Province outside the Default Country2023-12-13T20:08:15ZStoobContact Import will not accept State/Province outside the Default CountryTo reproduce on dmaster
1. within [Localization Settings](https://dmaster.demo.civicrm.org/civicrm/admin/setting/localization?reset=1)
a. set default country to United States
b. Ensure that for Available Countries box on the right i...To reproduce on dmaster
1. within [Localization Settings](https://dmaster.demo.civicrm.org/civicrm/admin/setting/localization?reset=1)
a. set default country to United States
b. Ensure that for Available Countries box on the right is blank in such that all countries are available for selection
2. go to Import Contacts
3. attempt import a file such as the one attached below that contains Country as a mapped column
4. note that Canada (and presumably another non-default) country is deemed invalid in the error report
[test-country.csv](/uploads/fb97a20935d51e0b9c72530fa12d663b/test-country.csv)
![import-errors-canada_province](/uploads/0b647875367fc261ff6a8fb134595d98/import-errors-canada_province.jpg)https://lab.civicrm.org/dev/core/-/issues/4234Change Dedupe Rule Usage Dialog Is Not Displayed2023-05-15T08:23:09ZLKuttnerChange Dedupe Rule Usage Dialog Is Not DisplayedReproduction steps
1. Go to Find and Merge Duplicate Contacts
2. Click _Edit Rule_ for a General Unreserved rule.
3. In Usage: Currently set to: click the _Change Usage_ button which is NOT disabled.
Current behaviour
The Change Usage ...Reproduction steps
1. Go to Find and Merge Duplicate Contacts
2. Click _Edit Rule_ for a General Unreserved rule.
3. In Usage: Currently set to: click the _Change Usage_ button which is NOT disabled.
Current behaviour
The Change Usage dialog does not appear and nothing at all happens.
Expected behaviour
The Change Usage dialog appears and the rule can be set as Supervised or Unsupervised.
Environment information
- CiviCRM 5.50.4
- Drupal 9.3.13
- PHP 7.4.19https://lab.civicrm.org/dev/core/-/issues/4235Simplify cron setup2023-04-18T20:10:24Zaydunsaidan.saunders@squiffle.ukSimplify cron setupOverview
----------------------------------------
A recurring problem for new users is how to get cron running for scheduled jobs.
We have documentation but it's still a stumbling block for many new users as shown by recurring questions...Overview
----------------------------------------
A recurring problem for new users is how to get cron running for scheduled jobs.
We have documentation but it's still a stumbling block for many new users as shown by recurring questions on Stack Exchange and chat, and (just now) discussed on the FormBuilder call.
Part of the problem is that it involves the OS and/or the hosting platform (cPanel etc) and we generally shy away from documenting anything in those areas but the collective brains of the Civi world surely can come up a way to make this work more easily.
Advanced users can obviously do their own thing, but the aim here is to lower the barrier for new installations to having a functioning cron.https://lab.civicrm.org/dev/core/-/issues/4237Count is inacurate in Find and Merge Duplicates2024-02-27T01:12:33ZStoobCount is inacurate in Find and Merge DuplicatesIn the attached example has only 800 contacts in the entire Civi although the same person has **several _dozen_ duplicates of themselves**, for whatever reason. The side effect is what appears to be an exponentially inaccurate duplicate ...In the attached example has only 800 contacts in the entire Civi although the same person has **several _dozen_ duplicates of themselves**, for whatever reason. The side effect is what appears to be an exponentially inaccurate duplicate count as well as in the batch merge screen.
![du](/uploads/c74e365a75d2fe01fcca2c39f07b1579/du.png)
![batcha](/uploads/46f2a517bbabadbd953c9b8c7e05661e/batcha.png)https://lab.civicrm.org/dev/core/-/issues/4241Refresh custom fields names in "Reuse an existing set"2023-04-18T06:50:39ZkristinecRefresh custom fields names in "Reuse an existing set"Overview
----------------------------------------
When adding a new custom field and selecting "reuse an existing set" of custom fields, the dropdown list for some of the multiple choice option sets do not pick up the custom field set na...Overview
----------------------------------------
When adding a new custom field and selecting "reuse an existing set" of custom fields, the dropdown list for some of the multiple choice option sets do not pick up the custom field set names. For example, you have a multiple choice question called "Educational Status" in Custom Field Set A and the same name "Educational Status" in Custom Field B.
Current behaviour
----------------------------------------
In CiviCRM 5.59, the custom field set labeling are missing for some old custom fields (made before a certain Civi update?).
![Screenshot_2023-04-15_111421](/uploads/dc83d16e1c6fcf8a2e9cce1961260909/Screenshot_2023-04-15_111421.png)
Proposed behaviour
----------------------------------------
The word "refresh" or "reset" the dropdown list probably isn't the right word. But the expected behavior should appear as:
Custom Field Set A:: Educational Status
Custom Field Set B:: Educational Status
P.S. And yes, technically if the options in "Educational Status" are exactly the same, this field set should have been shared rather than exist in two separate custom field sets.https://lab.civicrm.org/dev/core/-/issues/4243Support APCu with apcu_* functions2023-04-18T17:34:00ZherbdoolSupport APCu with apcu_* functionsAPC and APCu is supported according to https://docs.civicrm.org/sysadmin/en/latest/setup/cache/#config-ref but it currently only supports `apc_*` functions which are ~~backwards-compatible with~~ _not compatible_ with APC. ~~But some set...APC and APCu is supported according to https://docs.civicrm.org/sysadmin/en/latest/setup/cache/#config-ref but it currently only supports `apc_*` functions which are ~~backwards-compatible with~~ _not compatible_ with APC. ~~But some setups may only have the newer `apcu_*` functions so the class should try both functions.~~ APCu only has `apcu_*` functions, but still uses `apc.` for the configuration.
UPDATE: discovered there are some differences between the two in how they handle things, which isn't surprising. So depending on how much they differ, may require different classes.https://lab.civicrm.org/dev/core/-/issues/4244"Invoice.pdf" filename not translatable2023-04-18T06:49:02Zmmyriam"Invoice.pdf" filename not translatableWhen "Automatically email invoice when user purchases online" is enabled in CiviContribute Component Settings a pdf invoice is sent to the user who makes an online contribution.
The attached invoice's filename is not translated/translat...When "Automatically email invoice when user purchases online" is enabled in CiviContribute Component Settings a pdf invoice is sent to the user who makes an online contribution.
The attached invoice's filename is not translated/translatable from Invoice.pdf because it is hardcoded:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Task/Invoice.php#L613
```
public static function putFile($html, $name = 'Invoice.pdf', $format = NULL) {
return CRM_Utils_Mail::appendPDF($name, $html, $format)['fullPath'] ?? '';
}
```
The `putFile` function allows for a filename for when the invoice is sent by an admin from the contribution record.
In that case the invoice gets its name from the contribution invoice number which is created using the invoice prefix configured in CiviContribute Component Settings: https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Task/Invoice.php#L434
Reproduction steps
----------------------------------------
1. Enable "Automatically email invoice when user purchases online" in CiviContribute Component Settings
1. Make an online contribution on a contribution form
* where the receipt is enabled
* in a different language than English
1. Receive an email with Invoice.pdf attachedhttps://lab.civicrm.org/dev/core/-/issues/4245FormBuilder/SearchKit: add 'enabled' field2023-04-20T06:55:21Zaydunsaidan.saunders@squiffle.ukFormBuilder/SearchKit: add 'enabled' fieldOverview
----------------------------------------
Suggestion: add an 'enabled' field for both Searches and Forms (maybe Segments and related entities as well).
Why?: quite often I clone something, make some changes, switch to that - but...Overview
----------------------------------------
Suggestion: add an 'enabled' field for both Searches and Forms (maybe Segments and related entities as well).
Why?: quite often I clone something, make some changes, switch to that - but don't want to delete the original yet until I'm sure I don't want to revert to it. Marking it as 'not enabled' helps search & form management particularly as the numbers increase.https://lab.civicrm.org/dev/core/-/issues/4246FormBuilder Recaptcha ignored in CiviCase Form2023-04-20T06:54:55ZshaneonabikeFormBuilder Recaptcha ignored in CiviCase FormOverview
----------------------------------------
When creating a Afform CiviCase form volunteer form it seems to ignore whether the actual Recaptcha is completed. There is an error being thrown in the logs, but the form continues and i...Overview
----------------------------------------
When creating a Afform CiviCase form volunteer form it seems to ignore whether the actual Recaptcha is completed. There is an error being thrown in the logs, but the form continues and is redrected to the Post-Submit page.
+ Create a Form with Individual and Case
+ Add Custom Fields associated to Individual and set Autofill on Current User
+ Set Case Type to ```Volunteer Application``` and Status ```New Request```
+ Set permissions on Case to ```Open Access``` and ```Create```
+ Set permissions on Individual to ```Open Access``` and ```Create and Update```
+ No deduping
Here's the actual Markup I have
```html
<af-form ctrl="afform">
<af-entity data="{contact_type: 'Individual', source: 'Volunteer Application'}" type="Contact" name="Individual1" label="Individual 1" actions="{create: true, update: true}" security="FBAC" autofill="user" contact-dedupe="" />
<af-entity data="{contact_id: 'Individual1', case_type_id: '3', subject: 'Request Form - Volunteer Application', status_id: '4'}" actions="{create: true, update: false}" type="Case" name="Case1" label="Case 1" security="FBAC" />
<div class="af-markup">
<p>If you don't have the necessary documents or would like to know more about any of our policies or processes, please contact the office.</p>
</div>
<fieldset af-fieldset="Individual1" class="af-container" af-title="Your details">
<div class="af-container af-layout-cols">
<af-field name="first_name" defn="{required: true, input_attrs: {}}" />
<af-field name="last_name" defn="{required: true, input_attrs: {}}" />
</div>
<fieldset af-join="Email">
<div class="af-container af-layout-cols">
<af-field name="email" />
<af-field name="location_type_id" />
<af-field name="is_primary" defn="{afform_default: '1'}" />
</div>
</fieldset>
<div af-join="Phone" af-repeat="Add" min="2" max="2">
<fieldset class="af-container af-layout-inline">
<af-field name="phone" defn="{required: false, input_attrs: {}}" />
<af-field name="location_type_id" defn="{required: false, input_attrs: {}}" />
<af-field name="phone_type_id" />
</fieldset>
</div>
<div af-join="Address">
<div class="af-container">
<af-field name="street_address" />
</div>
<div class="af-container af-layout-cols">
<af-field name="city" />
<af-field name="state_province_id" />
<af-field name="country_id" />
<af-field name="postal_code" />
<af-field name="location_type_id" defn="{label: 'Address Location', input_attrs: {}, required: false}" />
</div>
</div>
<div class="af-container af-layout-cols" af-title="Your interests and skills">
<af-field name="Volunteer_Details.Interests" defn="{label: 'Interests', required: true}" />
<af-field name="Volunteer_Details.Your_Skills" defn="{label: 'Abilities / Skills / Experience', required: true}" />
</div>
<div id="check" class="af-container" af-title="Police Information Check (PIC) is required for this position">
<div class="af-markup">
<p>markup</p>
</div>
<af-field name="Volunteer_Details.Police_Check" defn="{label: false}" />
</div>
<div id="driver" class="af-container af-layout-cols" af-title="Additional Required Information">
<af-field name="Volunteer_Details.Driver_s_License" defn="{label: 'Your Driver\'s License'}" />
<af-field name="Volunteer_Details.Driver_Insurance" defn="{label: 'Your Car Insurance'}" />
</div>
<div class="af-container" af-title="Availability">
<af-field name="Availability.Days_of_Week" defn="{required: true, label: 'Available Days of Week'}" />
<div class="af-container">
<af-field name="Availability.Location_willing_to_volunteer" defn="{required: true, label: 'What location are you willing to volunteer at?'}" />
<af-field name="Availability.Choose_a_depot" defn="{input_attrs: {autoOpen: true}, label: 'Choose a depot that you are hoping to volunteer at', required: true, saved_search: 'All_Depots', security: 'FBAC'}" />
</div>
<div id="outreach" af-join="Custom_Outreach">
<af-field name="How_did_you_hear_about_us_" defn="{label: 'How did you hear about us?', help_pre: 'Let us know how you heard about us.', help_post: null}" />
</div>
<div class="af-container" af-title="Privacy of our Members">
<af-field name="Volunteer_Details.Consent_to_confidentiality_of_member_and_organizational_informat" defn="{label: 'Do you consent to maintaining the confidentiality of members and organizational information?', required: true}" />
</div>
</div>
</fieldset>
<fieldset af-fieldset="Case1" class="af-container">
<af-field name="details" defn="{label: 'Tell us a little bit about yourself'}" />
<crm-recaptcha2></crm-recaptcha2>
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Send Application</button>
</fieldset>
</af-form>
```
I don't think that this is a related problem to configuration of ```AuthX```, but if you need a screenshot of the permissions I set I can do that too.
Current behaviour
----------------------------------------
The submission goes directly to the Post-Submit page, and no actual entry is made for CiviCase.
The logs produce
```php
Apr 18 11:20:49 [debug] AJAX Error ({error_id}): failed with exception
Array
(
[error_id] => uJNn-04Ej-YDUq
[exception] => CRM_Core_Exception: "Validation Error"
#0 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/ext/afform/core/Civi/Api4/Action/Afform/AbstractProcessor.php(74): Civi\Api4\Action\Afform\Submit->processForm()
#1 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(72): Civi\Api4\Action\Afform\AbstractProcessor->_run()
#2 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(158): Civi\Api4\Provider\ActionObjectProvider->invoke()
#3 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php(250): Civi\API\Kernel->runRequest()
#4 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
#5 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Api4/Page/AJAX.php(138): civicrm_api4()
#6 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Api4/Page/AJAX.php(79): CRM_Api4_Page_AJAX->execute()
#7 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(319): CRM_Api4_Page_AJAX->run()
#8 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#9 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#10 /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke()
#11 /var/aegir/platforms/wordpress/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress->invoke()
#12 /var/aegir/platforms/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#13 /var/aegir/platforms/wordpress/wp-includes/plugin.php(565): WP_Hook->do_action()
#14 /var/aegir/platforms/wordpress/wp-includes/class-wp.php(797): do_action_ref_array()
#15 /var/aegir/platforms/wordpress/wp-includes/functions.php(1334): WP->main()
#16 /var/aegir/platforms/wordpress/wp-blog-header.php(16): wp()
#17 /var/aegir/platforms/wordpress/index.php(17): require("/var/aegir/platforms/wordpress/wp-blog-header.php")
#18 {main}
)
```
Expected behaviour
----------------------------------------
The form would not allow me to passthrough and would display an error message.https://lab.civicrm.org/dev/core/-/issues/4250Expose the mailing/mosaico template when viewing mailing report2023-06-19T23:42:32ZyashodhaExpose the mailing/mosaico template when viewing mailing reportCurrently, we don't show which mosaico template was used for a mailing in mailing reports.
It could be helpful as sometimes the template could be deleted and when the same mailing is re-used then mosaico is broken in the copied mailing....Currently, we don't show which mosaico template was used for a mailing in mailing reports.
It could be helpful as sometimes the template could be deleted and when the same mailing is re-used then mosaico is broken in the copied mailing. We could show name/id and deleted if not present.https://lab.civicrm.org/dev/core/-/issues/4251Track Contact `image_URL` files in the `civicrm_file` table2024-01-02T21:02:33ZcolemanwTrack Contact `image_URL` files in the `civicrm_file` table# History
**Note: CiviCRM is a large, old project with many contributors, which makes "big picture" perspectives cumbersome to gather. Often a contributor simply wants to fix a bug or add a small feature, not dive into decades-long hist...# History
**Note: CiviCRM is a large, old project with many contributors, which makes "big picture" perspectives cumbersome to gather. Often a contributor simply wants to fix a bug or add a small feature, not dive into decades-long history and contemplate massive refactoring. The story of the `civicrm_contact.image_URL` field is a microcosm of the complicated world of CiviCRM.**
- The `civicrm_contact.image_URL` field (added v1.1) predates the `civicrm_file` table (added v1.5), which may explain why it was originally designed as a simple textfield with no file-management. It is a simple varchar and can store the url to any image file on the web.
- Originally, the UI allowed contact image files to be uploaded to a publicly-readable directory on the webserver, and `image_URL` stored an absolute url to that file.
- In 2014, [security hardening](https://issues.civicrm.org/jira/browse/CRM-14499) led to the addition of an `.htaccess` rule which blocked the contents of that directory from public visibility.
- This accidentally broke contact images, leading to [a rushed fix](https://github.com/civicrm/civicrm-core/pull/3058) which created `CRM_Contact_Page_ImageFile` at `civicrm/contact/imagefile`. This path allows open access to all contact images, but not other files, by querying `civicrm_contact.image_URL` for a matching filename before outputting the contents. An upgrade script rewrote all local `image_URL` fields to point to this path, using an absolute URL. This solution works but is very slow on big databases due to the unindexed query.
- During this rushed fix, it doesn't appear that consideration was given to html escaping of `&` characters. The default behavior of `CRM_Utils_System::url` is to escape `&` to `&` which is (IMHO) a bad default and certainly a poor choice for storing url strings in the database, but it was the default and no one changed it, and then Tim inadvertently cemented it with 065034510d48b722844b2007f8016ea644bd0cbd so now in order to safely read the urls you must pass them through the aptly-named `CRM_Utils_String::unstupifyUrl()` function.
- In 2016 there was an [attempt to fix the absolute URL and performance issues](https://github.com/civicrm/civicrm-core/pull/9237) which updated all the `image_URL` fields to relative paths.
- But this would have broken Drupal Views and other tools that rely on the convenience of querying the field from the db and outputting the url directly (in the future, SearchKit would rely on this too).
- A [compromise solution was reached](https://github.com/civicrm/civicrm-core/pull/9241) which rewrites the url at runtime on Civi pages. A `image_URL` like `http://wp.demo/civicrm/contact/imagefile/?photo=abc.jpeg` would get rewritten to `http://wp.demo/civicrm/file?reset=1&filename=abc.jpeg&mime-type=image/jpeg`. For reasons not entirely clear, this goes through a different internal path (`civicrm/file` instead of `civicrm/contact/imagefile`).
- In 2019, thinking it was unused, [Eileen removed support](https://github.com/civicrm/civicrm-core/commit/2762985c11e01ede473d86a33af279bc341f9a46) for passing `filename=` into the `civicrm/file` path, since that endpoint is typically supplied with a file id from the `civicrm_file` table plus a security hash.
- This accidentally broke contact images, leading to [a rushed fix](https://github.com/civicrm/civicrm-core/pull/13663) which added back the ability to get files by name from the `civicrm/file` path (since contact images are not tracked in `civicrm_file` and don't have an `id`). With the benefit of the history laid out above, a better fix might have been to switch to using the `civicrm/contact/imagefile` path and keep the `civicrm/file` path secure.
- In 2021 [I proposed adding](https://lab.civicrm.org/dev/core/-/issues/2755) an `image_file_id` FK field to the `civicrm_contact` table to track uploaded files. This proposal was met with approval, but when I recently tried to implement it I realized that the `civicrm_file` table already has an FK to `civicrm_contact` and circular references are not allowed.
- In 2023 [an option group was added](https://github.com/civicrm/civicrm-core/pull/25904) for the previously unused column `civicrm_file.file_type_id`. One possible use for that field would be to designate a file type of `"contact_image"`.
# Current Situation
The `civicrm_contact.image_URL` field can still store any url string pointing to a file on or off the server. It could point to any image on the internet, and would work fine. But if it's a file uploaded via the Civi UI, it will be an absolute link pointing to the `civicrm/contact/imagefile` path with a `photo=filename` argument. If CiviCRM recognizes this pattern it will rewrite it on core pages to the other path at `civicrm/file`, otherwise it will leave it alone.
For the confused, yes contact images are accessible at two paths, and neither is a direct link to the file on disk:
| Path | `civicrm/contact/imagefile` | `civicrm/file` |
| ------ | ------ | ------ |
| Class | `CRM_Contact_Page_ImageFile` | `CRM_Core_Page_File` |
| Permission | _none_ | "access uploaded files" |
| Args | `photo` | `filename`, `mime-type` |
| Uses | Stored in `image_URL` field as absolute URL. Output by Views & SearchKit | `image_URL` rewritten to this path on Civi pages for logged-in users |
**This situation leads to the following quirks and problems**
1. The absolute url to `civicrm/contact/imagefile` works great in Views and SearchKit... as long as the site name never changes! Otherwise, absolute URLs are a pain.
2. The url is still stored with html-escaped `&` characters that must be unstupified.
3. Anyone can access a contact image via the 1st path if they know the filename, however, the 2nd has a permission check which means logged-in users without "access uploaded files" cannot see contact images even though anonymous users can!
4. The security hash usually required by `civicrm/file` can be circumvented if you know the filename and mime-type. But the risk is mitigated by that path requiring "access uploaded files" permission.
5. There is still no file-management of contact images. Deleting a contact does not delete their image file. Deleting or changing a contact image also doesn't delete the old one.
# Proposal for File Management
1. Stop using `civicrm/file` for all contact images and [restore the patch to remove support for `filename`](https://github.com/civicrm/civicrm-core/commit/2762985c11e01ede473d86a33af279bc341f9a46).
2. Include `cid` as an argument to `civicrm/contact/imagefile` (and update stored paths accordingly) to fix the unindexed query. Also add `is_deleted = 0` to the query.
3. Add an option_value `"contact_image"` to the option group for `civicrm_file.file_type_id`.
4. When uploading a new contact image, create a record in `civicrm_file` table, and designate it `file_type_id` = `"contact_image"`.
5. Also create a record in `civicrm_entity_file` for contact images.
6. Add a virtual APIv4 field for the contact entity `image_file_id` which would allow getting/setting the file id. When setting a new file id, regenerate the `image_URL` with a post hook.
# Thoughts on Absolute URLs
All of these changes would result in better file management, but still doesn't solve the absolute url issue. This is tricky to solve because Views and SearchKit still rely on being able to output the image url directly from a query. Here are a few ideas for that one:
1. Bite the bullet and update all `image_URL` fields pointing to a local file to use a relative URL. SearchKit will still work. Views and other SQL-based tools will still work unless embedded on a remote site. Random offsite images will be unaffected.
2. Keep `image_URL` absolute but add an APIv4 virtual field like `Contact.image` which calculates the url at runtime. This satisfies moree use-cases but at the expense of adding complexity to an already overcomplicated situation.https://lab.civicrm.org/dev/core/-/issues/4252Add a filter to mailing search/report to check if the mailing is mosaico or t...2023-05-01T07:38:30ZyashodhaAdd a filter to mailing search/report to check if the mailing is mosaico or traditionalAdd a filter to mailing search/report to check if the mailing is mosaico or traditional.
It might be useful to indicate the same next to result of mailing search -draft mailings, sent mailings.Add a filter to mailing search/report to check if the mailing is mosaico or traditional.
It might be useful to indicate the same next to result of mailing search -draft mailings, sent mailings.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4253cURL error when trying to update action-provider, data processor or CiviRules...2024-01-21T12:44:06ZMariaVcURL error when trying to update action-provider, data processor or CiviRules via UIOverview
----------------------------------------
When trying to update action provider or data processor via UI the following error occurs:
`(cURL error 28: Operation timed out after 5000 milliseconds with 142514 out of 408357 bytes rec...Overview
----------------------------------------
When trying to update action provider or data processor via UI the following error occurs:
`(cURL error 28: Operation timed out after 5000 milliseconds with 142514 out of 408357 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)`
Reproduction steps
----------------------------------------
1. Click on _Extensions_
2. Upgrade action-provider or data processor or CiviRules
3. Error (see above)
Current behaviour
----------------------------------------
Using wget via terminal the download for action provider takes 15 seconds.
Data processor download takes 1m 52s via wget.
It seems that lab.civicrm.org is quite slow.
Expected behaviour
----------------------------------------
Successful Update via UI
Possible solution: time out increasehttps://lab.civicrm.org/dev/core/-/issues/4255AdminUI breadcrumb links are confusing and unhelpful2023-05-02T07:14:25ZlarsssandergreenAdminUI breadcrumb links are confusing and unhelpfulOverview
----------------------------------------
The breadcrumb links for AdminUI pages are incorrect and confusing for users.
Current behaviour
----------------------------------------
For example for profile fields, the breadcrumb li...Overview
----------------------------------------
The breadcrumb links for AdminUI pages are incorrect and confusing for users.
Current behaviour
----------------------------------------
For example for profile fields, the breadcrumb links are:
`Home › CiviCRM › Admin › FormBuilder › Edit Form › Profile Fields`
If a user clicks the breadcrumb link for Profile Fields, they get all profile fields for all profiles, not just the profile fields for their profile. They also cannot go back to the main profiles page or the settings for the profile they are editing the fields for.
This is the same for custom fields and other AdminUI pages.
Expected behaviour
----------------------------------------
The breadcrumb links should be:
`Home › CiviCRM › Admin › Profiles › PROFILENAME › Profile Fields`
Clicking the breadcrumb links should lead to the expected pages.
Environment information
----------------------------------------
dmasterhttps://lab.civicrm.org/dev/core/-/issues/4256SearchKit: Does not list activities correctly on Contact Summary2023-06-30T10:16:22ZKurund JalmiSearchKit: Does not list activities correctly on Contact SummaryCreate a SK display to replace existing Activity tab.
![Screenshot_from_2023-04-22_17-46-25](/uploads/682c4d5e851ddcde05a825a286be6435/Screenshot_from_2023-04-22_17-46-25.png)
Activity Tab (SK) does not display activities.
![Screenshot...Create a SK display to replace existing Activity tab.
![Screenshot_from_2023-04-22_17-46-25](/uploads/682c4d5e851ddcde05a825a286be6435/Screenshot_from_2023-04-22_17-46-25.png)
Activity Tab (SK) does not display activities.
![Screenshot_from_2023-04-22_17-48-50](/uploads/28ef32556946fcc40b959a1fc507940e/Screenshot_from_2023-04-22_17-48-50.png)
Here is default Activity Tab
![Screenshot_from_2023-04-22_17-48-27](/uploads/5a7bb144c255c7461fa18eca54908eb8/Screenshot_from_2023-04-22_17-48-27.png)
I am checking this on master.https://lab.civicrm.org/dev/core/-/issues/4257Allow editing of payment method on contribution edit form when no payments ar...2023-05-30T22:23:24ZlarsssandergreenAllow editing of payment method on contribution edit form when no payments are associatedCurrently, the contribution edit form does not allow editing of the payment method for a pending contribution. This may be useful for users, for example if someone fills out a contribution page with pay later and so their contribution pa...Currently, the contribution edit form does not allow editing of the payment method for a pending contribution. This may be useful for users, for example if someone fills out a contribution page with pay later and so their contribution payment method is set to check, but they will actually pay with an etransfer and we want to note this. It is also potentially confusing because the user can mark the payment as completed and record the payment two ways, by clicking Record Payment or by changing the status to completed, but only the first of these allows the user to change the payment method.
I think we can safely allow editing of the payment method when there are no payments associated with a contribution.https://lab.civicrm.org/dev/joomla/-/issues/50Dead code files in civicrm-joomla repo?2023-05-15T08:02:24ZAllenShawDead code files in civicrm-joomla repo?CiviCRM / Joomla / PHP 8 seems to be a viable combination (per some quick testing, and comments from @seamuslee and @nicol in https://lab.civicrm.org/dev/joomla/-/issues/43).
Yet several files in the civicrm-joomla repo contain syntax e...CiviCRM / Joomla / PHP 8 seems to be a viable combination (per some quick testing, and comments from @seamuslee and @nicol in https://lab.civicrm.org/dev/joomla/-/issues/43).
Yet several files in the civicrm-joomla repo contain syntax errors under PHP 8, specifically (in line 53, and other lines) in these files:
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Events/tmpl/default.php#L53
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Events/tmpl/register.php#L53
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Profiles/tmpl/default.php#L53
So: I'm not sure if the above files are just dead code (i.e. they never run), or if they need to be cleaned up for proper PHP 8 support.