Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
The wrong mediasource is selected when updating a static element #13750
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.
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.
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.
This can be fix with this pull request: #13646
All MODX versions