Commerce default Mediasource

Hello
When can I define a default media source for Commerce ?

A default media source ID 2 is defined in MODX settings and it works fine when I go to Modx menu Media > Media browser (the default Media source is selected)

Screenshot from 2021-08-04 17-02-33

But when I want to select an image in product matrix, the default mediasource is ID 1 after a clic on Matrix > Edit > “select” (image)
Screenshot from 2021-08-04 17-04-14

Screenshot from 2021-08-04 17-00-53

There’s a commerce.media.source system setting to configure which one it uses by default.

commerce.media.source setting is 2
Additionally I get an err. 500 when I choose an image, but only with a specific user group having Content Editor and Commerce Full policies (Admin connection in mgr is OK)

Err 500
https://dev.xxxxx.com/connect_xxxxx/system/phpthumb.php?src=assets/project/urbanspree/mediasource/jim-avignon-im-urban-spree.jpeg&h=200

The path is ok but phpthumbs bugs

If it still shows 1 in the media source dropdown, that suggests the value of that setting may be getting overwritten somewhere. Perhaps in a context setting?

There is no media source setting in my web context settings. But I’think about a policy/right management because it occurs only for “Limited admin” users (group).

Screenshot from 2021-08-04 18-07-58

Now I can switch the media source in the modal window browser but the default medias source is not selected.

For an image TV, the default media source is selected when the media browser opens.

Below a screenshot with the media browser opened from image TV (left) and from Commerce/Matrix/select (right)

Screenshot from 2021-08-04 19-27-03

Regarding the matrix product modal window I fixed the problem for a non-admin user with:

to show image after selection

web/assets/components/commerce/backend/dist/commerce.js
line 1469
thumbUrl = MODx.config.connectors_url + ‘system/phpthumb.php?src=’ + url + ‘&h=200’,
thumbUrl = MODx.config.connectors_url + ‘system/phpthumb.php?src=/’ + url + ‘&h=200’,

To show image on open modal

omponents/commerce/src/Admin/Widgets/Form/ImageField.php
line 14
$thumb .= ‘?src=’ . $value;
$thumb .= ‘?src=/’ . $value;

Without this fix thumb is not created by phpthumb

Rather than changing core files, please adjust your media source configuration to return absolute URLs. Those changes you made will be reverted when upgrading.

I have this problem aswell. All user permissions are correct and all system settings are correct/not being overriden. The user doesnt have access to the admin file explorer but it doesnt automatically select the correct directory.

I’ve added this to our tracker and report back when we know more. It does seem likely something is not going right on the Commerce side if it affects multiple people.