User tests: Successful: Unsuccessful:
Pull Request for Issue #21249 .
by adding a new error type(COM_CONFIG_ERROR_VALIDATION) in ApplicationController.php file, you're going to be able to see description why form validation failed instead of getting an error which is 'No database selected'
Edit the Global configuration and provide an incorrect value for "session lifetime" : 19999
(it is possible to bypass the maximum value of the input field, which is 16383)
The configuration is not saved and the user get a error message with the explanation of the issue which is 'Form validation failed. Please check the form.'
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_config |
Use error from model:
$this->app->enqueueMessage($model->getError(), 'error');
I have not tested this item.
I have tested this item
19999 is saved and Message shows Constant.
Is the PR missing the string being added to the language file?
Labels |
Added:
?
|
Category | Administration com_config | ⇒ | Administration com_config Language & Strings |
Labels |
Added:
?
|
FILE: ...dministrator/components/com_config/Controller/ApplicationController.php
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
122 | ERROR | Tabs must be used to indent lines; spaces are not allowed
123 | ERROR | Tabs must be used to indent lines; spaces are not allowed
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------
Title |
|
Title |
|
Codestyle fixed
I have tested this item
I have tested this item
Language String shown correct, but incorrect value for "session lifetime" "19999" is saved
Hi,
The "session lifetime" is not saved in the configuration ; it is coming from the session which store the form data to not loose what the user was editing.
So the user know that the configuration is not saved but its form is kept which allow him to fix what is wrong (but he need to know what is wrong)
There is a comment saying that the model should display the error message (which is not the case and we don't know why).
The validate method enqueued all messages for us, so we just need to redirect back.
Letting the model display the errors or pushing the errors from the model is a requirement because the user must know what is going from with the provided data.
The patch fix the issue but it would require further improvements to have a good user experience.
Regards,
Category | Administration com_config Language & Strings | ⇒ | Administration com_config |
Using "Blanks" before or after the value is accepted.
No error message - the value after saving is 15.
Example " 18005", "18005 " is value "15" after saving
Proposed solution, trim before check.
I have tested this item
#
Language String is shown correct, but incorrect value for "session lifetime" "19999" is saved
System information
Joomla! 4.0.0-beta1-dev Development [ Amani ] 17-October-2019 20:21 GMT
Web Server : Apache
WebServer to PHP Interface : cgi-fcgi
PHP 7.3.8
MySQL 5.7.23-cll-lve
Hi,
Now language string showing a correct message and also incorrect value for "session lifetime" "19999" is not storing in config.php
But In the backend UI System -> Global Configuration still showing "19999" this value under "session lifetime".
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-02 01:33:16 |
Closed_By | ⇒ | Quy | |
Labels |
Added:
Conflicting Files
|
Category | Administration com_config | ⇒ | Administration com_config Language & Strings |
I have tested this item? unsuccessfully on 35e8d5b19999
is saved and Message shows Constant.Please ignore Test as for now Front- and Backend-PRs are able to test by Patchtester.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21384.