User tests: Successful: Unsuccessful:
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.
Go to Redirects.
In configuration enable Advanced Mode.
Try to create a new redirect.
Redirect form opens but Redirect Status Code
field is a text field (it should be a select list).
Error page is shown with message:
Class for field type "redirect" not found.
Yes.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
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 is a really hard b/c break and should be communicated before deprecating this behavior. I think it's too late for j4.
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.
@HLeithner Shall I remove RTC?
@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.
@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.
Unfortunately I think this is too late. I definitely would have merged it if we were back in alpha (or before) though.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-15 21:59:22 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
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.
Because no "J5 Rebase" label yet
I would suggest to add a deprecation notice to 3.10 or 4.0...
I have tested this item✅ successfully on a805928
with pr:
without pr:
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31014.