J3 Issue ?
avatar PhilETaylor
PhilETaylor
27 Mar 2017

Steps to reproduce the issue

Install joomla-cms/staging@1c52ed38516f2406fe63dbb762242ae3b82cfcb2

Create media field, only completing the required fields such as:

screen shot 2017-03-27 at 14 26 39

Go to front end and edit article - click select on the media field

Expected result

Nice model with a good look and feel

Actual result

Note the invalid blank dropdown next to the up button.

screen shot 2017-03-27 at 14 27 07

System information (as much as possible)

https://gist.github.com/PhilETaylor/b1ff259a06518f903339950ca81e35d7

avatar PhilETaylor PhilETaylor - open - 27 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Mar 2017
avatar PhilETaylor PhilETaylor - edited - 27 Mar 2017
avatar PhilETaylor PhilETaylor - edited - 27 Mar 2017
avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
Title
com_fields Media Field
com_fields Media Field when usign defaults and only required fields set
avatar brianteeman
brianteeman - comment - 27 Mar 2017

Are you on the latest staging? I cant replicate this

screenshotr14-45-13

screenshotr14-46-22

avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
Title
com_fields Media Field
com_fields Media Field when usign defaults and only required fields set
avatar PhilETaylor PhilETaylor - edited - 27 Mar 2017
avatar PhilETaylor
PhilETaylor - comment - 27 Mar 2017

screen shot 2017-03-27 at 14 47 25

commit 1746f5798b0b71c7b32ae1350d70fff18d8ff228
Author: Allon Moritz <allon.moritz@digital-peak.com>
Date:   Thu Feb 23 11:39:44 2017 +0100

    Remove home option in media form field (#13893)
avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
Title
com_fields Media Field when usign defaults and only required fields set
com_fields Media Field when using defaults and only required fields set
avatar brianteeman
brianteeman - comment - 27 Mar 2017

double checked on staging and still cant replicate

avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
The description was changed
Title
com_fields Media Field when usign defaults and only required fields set
com_fields Media Field when using defaults and only required fields set
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-27 15:38:52
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 27 Mar 2017
avatar PhilETaylor PhilETaylor - close - 27 Mar 2017
avatar PhilETaylor
PhilETaylor - comment - 27 Mar 2017

Are you trying the frontend or the admin console?

joomla-cms/staging@d7caa77

avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
Status Closed New
Closed_Date 2017-03-27 15:38:52
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - reopen - 27 Mar 2017
avatar PhilETaylor PhilETaylor - reopen - 27 Mar 2017
avatar PhilETaylor
PhilETaylor - comment - 27 Mar 2017

As the opening statement states:

Steps to reproduce the issue

Go to front end and edit article - click select on the media field

Its fine in admin, and broken in the frontend.

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category com_fields
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Apr 2017
Category com_fields com_fields Templates (site)
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Apr 2017
Status New Discussion
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2017
Title
[com_fields] Media Field when using defaults and only required fields set
com_fields Media Field when using defaults and only required fields set
avatar joomla-cms-bot joomla-cms-bot - edited - 2 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Title
com_fields Media Field when using defaults and only required fields set
[com_fields] Media Field when using defaults and only required fields set
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2017
Title
com_fields Media Field when using defaults and only required fields set
[com_fields] Media Field when using defaults and only required fields set
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2017
Title
com_fields Media Field when using defaults and only required fields set
[com_fields] Media Field when using defaults and only required fields set
avatar PhilETaylor PhilETaylor - comment - 24 Apr 2017
avatar Bakual
Bakual - comment - 24 Apr 2017

Can't reproduce that as well. Dropdown folder appears as expected in frontend article edit. Even without first saving the plugin parameters.

avatar PhilETaylor PhilETaylor - comment - 24 Apr 2017
avatar Quy
Quy - comment - 24 Apr 2017

I am unable to reproduce too. Your 1st screenshot is different than in RC4. For the Directory field, it should have a dropdown with an - Use Default - option. Have you done a clean install of RC4 downloaded from:
Joomla!

avatar PhilETaylor PhilETaylor - comment - 24 Apr 2017
avatar Bakual
Bakual - comment - 24 Apr 2017

Tested again on Chrome and Edge on Windows XAMPP, can't reproduce that behavior even after opening and closing the modal multiple times.
I noticed a 404 error in the console about the ajax-loader.gif, but should not be related (imho).
So it may be related to Mac somehow?

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2017

screen shot 2017-04-24 at 19 41 51

See the source code, the "normal" has options, but the "chosen" js widget has no options, so this looks to be the implementation of the chosen dropdowns, or something along those lines. EDIT: uploaded larger html screenshot

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2017

width: 2px; . WTF!!!

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2017

upstream bug confirmed. harvesthq/chosen#2029

Putting this:

.chosen-container .chosen-choices .search-field:only-child,
.chosen-container .chosen-choices .search-field:only-child input {
    width: 100% !important;
}

into the templates css fixes the problem for me like harvesthq/chosen#2029 (comment) states

avatar PhilETaylor PhilETaylor - comment - 24 Apr 2017
avatar dgt41
dgt41 - comment - 24 Apr 2017

@PhilETaylor the sooner Joomla goes away from chosen the better: harvesthq/chosen#1740 (comment)

avatar zero-24
zero-24 - comment - 24 Apr 2017

hmm can somone on a Mac try to confirm this? I have tryed this now multible times. But i can not reproduce the problem on Windows using the last version of chrome.

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2017

If I load http://127.0.0.1:8000/index.php/index.php?option=com_media&view=images&tmpl=component&asset=61&author=16&fieldid=jform_com_fields_somemedia&ismoo=0&folder= directly in the browser it works fine - the width is fine

Its only when that url is loaded as an iframe source in a modal on the frontend that I can replicate the upstream issue

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Apr 2017

Can't confirm:
Difference in Screenshot of opened Comment is Directory:
1
So is looks fine in Modal:
bildschirmfoto 2017-04-24 um 21 36 21

System information

3.7.0-rc4
macOS Sierra, 10.12.4
Firefox 53 (64-bit)

MAMP 4.1.1

  • PHP 7.0.15
  • MySQLi 5.6.35
avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2017

The same modal is used when you click the image button in TinyMCE when editing a content item on the front of the site - this ALWAYS displays the folder list correct.

This further leads me to believe that this is a com_fields initialisation of the modal that is at fault

avatar Bakual
Bakual - comment - 25 Apr 2017

If you want to have a look at the respective com_fields specific code for that formfield: https://github.com/joomla/joomla-cms/blob/staging/plugins/fields/media/media.php

It's the exact same code in front- and backend. I honestly can't think of a place within the PHP code of fields which could generate your issues. It should be the same behavior everytime anyway.

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2017

@Bakual as the comments above prove - it is an issue - and is caused by upstream bugs in chosen...

avatar Bakual
Bakual - comment - 25 Apr 2017

I never said it's not an issue. It's just that com_fields doesn't do anything different here than com_content does. It's the same formfield that gets rendered and it's also the same code in JForm which does it. There is no difference here.
Thus I wonder where the issue cos from, as I don't think it's a com_fields specific one.

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar PhilETaylor PhilETaylor - change - 10 Feb 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-02-10 21:35:11
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 10 Feb 2019

Add a Comment

Login with GitHub to post a comment