You can change the image
Nightly Joomla of Saturday, 22 August 2020 02:00:33 UTC
Firefox 79.0 (64 bit) @ Ubuntu 20.04
Chrome 84.0.4147.125 (Build ufficiale) (a 64 bit) @ Ubuntu 20.04
I create a custom module with 2 image and another module with repeatable filed with media.
After you select an image the other image can't selected (images for different fields, but the same page).
Labels |
Added:
?
|
Confirmed.
Uncaught TypeError: this.querySelector(...) is null show http://localhost:8888/sample/joomla40/media/system/js/fields/joomla-field-media.min.js:1
in the non minified file
joomla-field-media.js:252:12
@infograf768 can you please enable debug to get the line number that throws the error?
this.querySelector('[role="dialog"]').open();
can you try this:
show() {
const button = this.querySelector(this.buttonSaveSelected);
const modal = `imageModal_${this.input.id}`;
const modalElement = this.querySelector(modal);
if (!button || !modalElement) {
throw new Error('Misconfiguaration...');
}
modalElement.open();
Joomla.selectedFile = {};
button.addEventListener('click', this.onSelected);
}
build/media_source/system/js/fields/joomla-field-media.w-c.es6.js around line 194
To replace entirely
show() {
this.querySelector('[role="dialog"]').open();
Joomla.selectedFile = {};
this.querySelector(this.buttonSaveSelected).addEventListener('click', this.onSelected);
}
??
yes, replace the whole show function
Uncaught Error: Misconfiguaration...
have to go. will be back later.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-23 10:13:39 |
Closed_By | ⇒ | alikon |
I can't replicate, can you please share if you have any console errors in the browser?