J4 Issue ?
avatar bassmanpaul
bassmanpaul
25 Mar 2017

So in JForm usually a field can have a filter attribute like filter="cmd" which allows JForm to filter the users input for that field. However, in the FileList & FolderList fields the filter attribute is overwritten and used in the field itself rather than by JForm.

In these fields the filter attribute is passed to JFolder::files( $path, $this->filter ). This means we can no longer filter the actual form field itself.

Is this intentional or is it an oversight?

If it is an oversight then the attribute that filters JFolder needs changing.

The fields in question are:

libraries/joomla/form/fields/filelist.php
libraries/joomla/form/fields/folderlist.php

I'm happy to create a pull request if you like, changing filter=".css" to filefilter="" perhaps?

This would be a breaking change as there are a number of Joomla forms that use this field that will need the attribute changing as well:

administrator/components/com_languages/models/forms/language.xml
     filter="\.gif$"
components/com_mailto/mailto.xml
     filter="."
plugins/editors/codemirror/codemirror.xml
     filter="\.css$"
plugins/editors/tinymce/form/setoptions.xml
     filter="\.js$"
avatar bassmanpaul bassmanpaul - open - 25 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category Fields
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Apr 2017
Status New Needs Review
avatar mbabker
mbabker - comment - 27 Apr 2017

Added to the 4.0 task board. This is a B/C break that is IMO going to be needed.

avatar joomla-cms-bot joomla-cms-bot - close - 27 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Apr 2017
Status Needs Review Known Issue
Closed_Date 0000-00-00 00:00:00 2017-04-27 06:12:14
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 27 Apr 2017
Status Known Issue Closed
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 27 Apr 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - reopen - 27 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Apr 2017
Status Closed Discussion
Closed_Date 2017-04-27 06:12:14
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - reopen - 27 Apr 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 Apr 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Apr 2017

Sorry, wrong Button.

avatar brianteeman brianteeman - change - 18 Aug 2017
Title
JFormField FileList & FolderList have conflicting 'filter' attributes
[4.0] JFormField FileList & FolderList have conflicting 'filter' attributes
avatar brianteeman brianteeman - edited - 18 Aug 2017
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar SharkyKZ
SharkyKZ - comment - 22 May 2019

Test PR #24977 please.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 May 2019

Closed as having Pull Request #24977

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 May 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-05-22 06:35:31
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig franz-wohlkoenig - close - 22 May 2019

Add a Comment

Login with GitHub to post a comment