?
avatar nielsnuebel
nielsnuebel
9 May 2017

Steps to reproduce the issue

You need a form.xml with type repeatable. In it a type media.

EXAMPLE:

<field name="gallery_news"
    type="repeatable"
    icon="list"
    description="KICKCCK_FIELD_NEWS_GALLERY_LABEL"
    label="KICKCCK_FIELD_NEWS_GALLERY_DESC"
    default=""
    maximum="9"
    >
				<fields name="params">
					<fieldset hidden="true" name="list_news_gallery" repeat="true">
						<field  name="gallery_image"
								type="media"
								directory="newsimage"
								label="KICKCCK_FIELD_NEWS_GALLERYIMAGE_LABEL"
								description="KICKCCK_FIELD_NEWS_GALLERYIMAGE_DESC"
								preview="true"
						/>
						<field name="gallery_alt" type="text"
							   size="40" label="KICKCCK_FIELD_NEWS_GALLERY_ALT_LABEL"
							   description="KICKCCK_FIELD_NEWS_GALLERY_ALT_DESC"
						/>
						<field  name="gallery_lightbox"
								type="radio"
								default="1"
								label="KICKCCK_FIELD_NEWS_GALLERY_LIGHTBOX_LABEL"
								description="KICKCCK_FIELD_NEWS_GALLERY_LIGHTBOX_DESC"
						>
							<option value="0">JNO</option>
							<option value="1">JYES</option>
						</field>
					</fieldset>
				</fields>
			</field>

If you click on Select Image Button it dosen't open the Modal Window with the com_media component.

I know the type repeatable ist deprecated. The PROBLEM is the ISIS Backend Template.

Rename these file and it works.

Maybe these file need an update

Expected result

Actual result

System information (as much as possible)

Joomla 3.7

Additional comments

avatar nielsnuebel nielsnuebel - open - 9 May 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 May 2017
avatar C-Lodder
C-Lodder - comment - 9 May 2017

Problem being is BS2 doesn't support multiple modals being open at once. I believe this was one of the reasons why subform fields were created.

avatar nielsnuebel
nielsnuebel - comment - 9 May 2017

The problem is that JQuery live problem with the DOM.

I add these CODE to repeatabel.js

// fix media field in ISIS Template
			$row.find('.field-media-wrapper').each(function(){
				var $el = $(this);
				$el.fieldMedia();
			});
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 May 2017
Status New Discussion
avatar justinherrin
justinherrin - comment - 26 May 2017

I can confirm this issue. It's rather frustrating that things were working perfectly fine in Joomla 3.6.5 and then once update to 3.7.x the "Select" button does not work anymore.

screen shot 2017-05-25 at 7 43 10 pm

System Information

Joomla 3.7.2
PHP 7.0.8

Again, this media field inside a repeatable field worked just fine in Joomla 3.6.5.

avatar rpasing
rpasing - comment - 30 May 2017

Can confirm this for latest Joomla! 3.7.2, with 3.6 it worked. Above hack by @nielsnuebel (inserting code into repeatable.js) fixed the problem. Shouldn't we create a PR for this?

avatar infograf768
infograf768 - comment - 31 May 2017

Please do create the PR.

avatar ginphreak
ginphreak - comment - 21 Jul 2017

Hi, at wicth line into repeatable.js i had to add nielsnuebel's code? beacuse i add it at the end (before "})(jQuery);") and it not works. Can you help me please? (Sorry for my poor english)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15917.

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jul 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-07-21 14:08:34
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 21 Jul 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 21 Jul 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Jul 2017

closed as having PR #17205


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15917.

avatar jinbullsushil
jinbullsushil - comment - 1 Aug 2017

HI ,
I have the same problem occurred. Now I have fixed my problem.
Below are the steps
Go to the below directory
administrator\templates\isis\html\layouts\joomla\form\field
and remove/rename "media.php"

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Aug 2017

@jinbullsushil can you please test #17205?

avatar fede91it
fede91it - comment - 10 Jan 2018

The solution proposed by @jinbullsushil solves the problem perfectly.

Why has the bug not yet been solved officially since the solution was proposed in August?

avatar C-Lodder
C-Lodder - comment - 10 Jan 2018

@fede91it - A PR has been submitted, so please feel free to test and mark your result.

#17205

2 successfull tests are required for it to be merged.

Else if it doesn't work, you could submit a new PR to remove that file as suggested by @jinbullsushil

avatar muuvmuuv
muuvmuuv - comment - 11 Jun 2018

The PR #17205 is no longer working with a repeatable field + modal_article-field. Tested on Joomla V3.8.8

      <!-- Fieldset: Dock -->
      <fieldset name="dock" label="Dock">

        <field name="dock_links" type="repeatable" icon="link" label="Links">
          <fieldset hidden="true" repeat="true" addfieldpath="/administrator/components/com_content/models/fields">
            <field name="name" type="text" label="Name" description="Social Name" filter="text"/>
            <field 
              name="article"
              type="modal_article"
              label="Select an article"
              select="true"
              edit="false"
              clear="true"
            />
          </fieldset>
        </field>

      </fieldset>
      <!-- ./Fieldset: Dock -->
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Jun 2018

@muuvmuuv can you please open a new Issue as Comments on closed Issues didn't get much Notice.

Add a Comment

Login with GitHub to post a comment