?
avatar uglyeoin
uglyeoin
19 Oct 2019

Steps to reproduce the issue

Create a custom field for repeatable (subform).
Create a media field within repeatable (subform).
Click on media as if to upload an image

Here is a video explanation:
https://youtu.be/2zwh2Tvayb4

If you click save you can then update the item.

Expected result

Can upload media

Actual result

Nothing happens. Console shows this JS error.
TypeError: this.querySelector(...).open is not a functionjoomla-field-media.js:244:45

System information (as much as possible)

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
1.00

avatar uglyeoin uglyeoin - open - 19 Oct 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Oct 2019
avatar datsepp
datsepp - comment - 25 Oct 2019

I can confirm this and I already can guess why that is not working, but I have neither the time to rewrite that nor do I know, what problems could occur after a rewrite.

Okay: Try this ->

  1. Create a custom field for repeatable in the com_fields component and add media field within that (form fields down below).
  2. Create a 2nd custom field for media uploads - just for testing purpose.
  3. Edit any user and open the custom fields tab.
  4. On the one side you have your repeatable and on the other your working media upload.
  5. Add a media field in the repeatable by pressing the plus button.
  6. The dynamic generated media field wont open a modal.
  7. Save that page now, and try it again. It will work now.

For those who just want to see that in action, I recorded a small video:
http://sebenns.com/src/VVw4ulL6Iv.mp4

Tl;dr: In the way it is actually implemented it won't work with dynamic rendering.
Modal gets rendered in media.php (124-137).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26711.
avatar uglyeoin uglyeoin - change - 19 Jul 2020
The description was changed
avatar uglyeoin uglyeoin - edited - 19 Jul 2020
avatar uglyeoin uglyeoin - change - 19 Jul 2020
The description was changed
avatar uglyeoin uglyeoin - edited - 19 Jul 2020
avatar Quy
Quy - comment - 23 Aug 2020

Please test #30455

avatar Quy Quy - change - 23 Aug 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-08-23 17:28:19
Closed_By Quy
avatar Quy Quy - close - 23 Aug 2020
avatar Didldu-Florian
Didldu-Florian - comment - 28 Feb 2021

Problem still exists again:

grafik
Steps to reproduze, see here: #28953 (same here!)

@Quy please reopen issue!

Add a Comment

Login with GitHub to post a comment