No Code Attached Yet
avatar PhilETaylor
PhilETaylor
16 Jun 2020

Steps to reproduce the issue

Joomla 4.0.0 beta 1
http://example.com/administrator/index.php?option=com_config&view=component&component=com_media

delete the value text/html from illegal mime types (which is perfectly valid to do, a admin might want a user to be able to upload html files)

click save

Expected result

field remains empty. No mime types are blacklisted on upload

Actual result

field is repopulated with text/html

Additional comments

Also applies to other fields on this page, for example (no idea why you would want to, that's why Im highlighting the above only) you cannot delete all the legal extensions or legal mime types

Screenshot 2020-06-16 at 21 25 01

avatar PhilETaylor PhilETaylor - open - 16 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Jun 2020
avatar mbabker
mbabker - comment - 16 Jun 2020

If I had to blindly guess it's the same long standing problem of the value from the default attribute on a form field definition being used when a field is submitted with an empty value.

avatar brianteeman
brianteeman - comment - 25 Apr 2021

Michael is correct with the reason.

However I wouldnt try to "fix it" because the reason for this is so that you can reset the value of a field to the defaults.

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

Its also reasonable to assume an admin might not want to block any MIME Types, and therefore the catch 22 exists - you can't allow all because doing so resets the default.

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

and if the underlying reason for this is as stated - then this has knock on effects for ALL fields where an admin might rightly want to remove the default and save a blank value.

avatar brianteeman
brianteeman - comment - 25 Apr 2021

I doubt that there is a real world example where a default is present and you would want to make it blank. I'm not going to take the time to try and find one.

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

I already gave one.

delete the value text/html from illegal mime types (which is perfectly valid to do, a admin might want a user to be able to upload html files)

avatar brianteeman
brianteeman - comment - 25 Apr 2021

ok ouch i withdraw my earlier comment

avatar PhilETaylor PhilETaylor - change - 6 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-06 21:23:54
Closed_By PhilETaylor
Labels Added: No Code Attached Yet
Removed: ?
avatar PhilETaylor PhilETaylor - close - 6 Mar 2022
avatar PhilETaylor
PhilETaylor - comment - 6 Mar 2022

no one else complained in the last decade so can't be that important.

avatar Webdongle
Webdongle - comment - 6 Jul 2022

Is that what is causing #38235 ?

avatar richard67
richard67 - comment - 9 Jul 2022

Is that what is causing #38235 ?

I think that's the case.

Add a Comment

Login with GitHub to post a comment