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

[4.0] TypeError: this.querySelector(...).open is not a functionjoomla-field-media.js:244:45 #26711

Closed
uglyeoin opened this issue Oct 19, 2019 · 3 comments

Comments

@uglyeoin
Copy link
Contributor

uglyeoin commented Oct 19, 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

@sebenns
Copy link
Contributor

sebenns commented Oct 25, 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.

@Quy
Copy link
Contributor

Quy commented Aug 23, 2020

Please test #30455

@Quy Quy closed this as completed Aug 23, 2020
@HRIT-Florian
Copy link
Contributor

HRIT-Florian commented Feb 28, 2021

Problem still exists again:

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

@Quy please reopen issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants