Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The wrong mediasource is selected when updating a static element #13750

Oetzie opened this issue Feb 6, 2018 · 2 comments


None yet
2 participants
Copy link

commented Feb 6, 2018


The wrong mediasource is selected when updating a static element.

Step to reproduce

Make an static element with a custom mediasource and save the static element. After saving and refreshing the window the wrong mediasource (default mediasource) is selected for the element.

Observed behavior

The mediasource of the 'static_file' is set by a listener on the 'mediasource' field. But when you update a static element you don't change the mediasource so the listener wont be fired.

Expected behavior

Add the following line to the config of the 'static_file' field for each element panel (plugins, chunks, templates, snippets). With this line the mediasource will be set to the record or the default mediasource on the page load and not only with a listener on the 'mediasource' field.

,source: config.record.source != null ? config.record.source : MODx.config.default_media_source

This can be fix with this pull request: #13646


All MODX versions


This comment has been minimized.

Copy link
Contributor Author

commented Feb 9, 2018

I'm going to try and fix this today #modxbughunt

Mark-H added a commit that referenced this issue Feb 9, 2018

Fix selecting the right media source when editing a static element [#…

Merge remote-tracking branch 'upstream/pr/13762' into 2.6.x

* upstream/pr/13762:
  Test template deleted
  Static file mediasource fix

This comment has been minimized.

Copy link

commented Feb 9, 2018

Fixed per #13762 in 2.6.2

@Mark-H Mark-H closed this Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.