? ? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
9 Oct 2020

Summary of Changes

Currently, when a form field class is not found, we fall back to a text field. This is highly unexpected and hard to spot for developers. If missing field class is not fixed, this ends up with poorly usable form and has potential security implications.

This changes the behavior so an exception is thrown instead.

Testing Instructions

Go to Redirects.
In configuration enable Advanced Mode.
Try to create a new redirect.

Actual result BEFORE applying this Pull Request

Redirect form opens but Redirect Status Code field is a text field (it should be a select list).

Expected result AFTER applying this Pull Request

Error page is shown with message:

Class for field type "redirect" not found.

Documentation Changes Required

Yes.

a805928 9 Oct 2020 avatar SharkyKZ CS
avatar SharkyKZ SharkyKZ - open - 9 Oct 2020
avatar SharkyKZ SharkyKZ - change - 9 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2020
Category Libraries
avatar SharkyKZ SharkyKZ - change - 9 Oct 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 9 Oct 2020
avatar SharkyKZ SharkyKZ - change - 9 Oct 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 9 Oct 2020
avatar gostn gostn - test_item - 9 Oct 2020 - Tested successfully
avatar gostn
gostn - comment - 9 Oct 2020

I have tested this item successfully on a805928

with pr:

Screen Shot 2020-10-09 at 09 09 39

without pr:

Screen Shot 2020-10-09 at 09 08 46


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31014.
avatar SharkyKZ SharkyKZ - change - 9 Oct 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 9 Oct 2020
avatar SharkyKZ SharkyKZ - change - 9 Oct 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 9 Oct 2020
avatar ChristineWk ChristineWk - test_item - 9 Oct 2020 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 9 Oct 2020

I have tested this item successfully on a805928


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

avatar alikon alikon - change - 9 Oct 2020
Status Pending Ready to Commit
avatar alikon
alikon - comment - 9 Oct 2020

RTC


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

avatar richard67 richard67 - change - 9 Oct 2020
Labels Added: ? ?
avatar ohrionmartin ohrionmartin - test_item - 9 Oct 2020 - Tested successfully
avatar ohrionmartin
ohrionmartin - comment - 9 Oct 2020

I have tested this item successfully on a805928

System Information

php: Linux orion 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64
dbserver: mysql
dbversion: 8.0.21-0ubuntu0.20.04.4
dbcollation: utf8mb4_0900_ai_ci
dbconnectioncollation: utf8mb4_0900_ai_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.4.3
server: Apache/2.4.41 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta4 Beta [ Mañana ] 15-September-2020 13:46 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0


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

avatar HLeithner
HLeithner - comment - 11 Oct 2020

This is a really hard b/c break and should be communicated before deprecating this behavior. I think it's too late for j4.

avatar laoneo
laoneo - comment - 11 Oct 2020

Agree here with Harald. Also create a none text custom field for articles. Then unpublish it and open an article form. Pretty sure we have there an exception.

avatar richard67
richard67 - comment - 15 Oct 2020

@HLeithner Shall I remove RTC?

avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2020

@richard67 No, the PR is fine. But it's ultimately up to @wilsonge to decide if he wants this in 4.0 at this point.

avatar richard67
richard67 - comment - 15 Oct 2020

@richard67 No, the PR is fine. But it's ultimately up to @wilsonge to decide if he wants this in 4.0 at this point.

Well that was the reason for my question. It's clear to me that it's fine regarding solving the issue.

avatar wilsonge
wilsonge - comment - 15 Oct 2020

Unfortunately I think this is too late. I definitely would have merged it if we were back in alpha (or before) though.

avatar wilsonge wilsonge - change - 15 Oct 2020
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2020-10-15 21:59:22
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 15 Oct 2020
avatar laoneo
laoneo - comment - 16 Oct 2020

Why close? I would leave it open or create at least an issue as it is something we need to think about what to do when a field is not available. Fallback to text fields is really a problem as it can cause invalid data.

avatar SharkyKZ
SharkyKZ - comment - 16 Oct 2020

Because no "J5 Rebase" label yet ?

avatar HLeithner
HLeithner - comment - 16 Oct 2020

I would suggest to add a deprecation notice to 3.10 or 4.0...

Add a Comment

Login with GitHub to post a comment