-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] it shows that description of error to add new error type #21384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
|
Use error from model: |
|
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21384. |
|
I have tested this item 🔴 unsuccessfully on 35e8d5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21384. |
|
Is the PR missing the string being added to the language file? |
|
@Twincarb yes |
|
|
||
| // Redirect back to the edit screen. | ||
| $this->setRedirect(Route::_('index.php?option=com_config', false)); | ||
| $this->app->enqueueMessage(\JText::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the namespaced code so this should be Text and not \JText
| // Redirect back to the edit screen. | ||
| $this->setRedirect(Route::_('index.php?option=com_config', false)); | ||
| $this->app->enqueueMessage(\JText::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); | ||
| $this->app->redirect(\JRoute::_('index.php?option=com_config', false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the namespaced code so this should be Route and not \JRoute
|
| // Redirect back to the edit screen. | ||
| $this->setRedirect(Route::_('index.php?option=com_config', false)); | ||
| $this->app->enqueueMessage(Text::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); | ||
| $this->app->redirect(\JRoute::_('index.php?option=com_config', false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Route here
|
Codestyle fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approve language changes
|
I have tested this item ✅ successfully on 1a3c4eb This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21384. |
|
I have tested this item 🔴 unsuccessfully on 1a3c4eb System information
CloudAccess.net
|
|
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. There is a comment saying that the model should display the error message (which is not the case and we don't know why).
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. Regards, |
|
Using "Blanks" before or after the value is accepted. Proposed solution, trim before check. |
|
I have tested this item 🔴 unsuccessfully on 88726e0 System information This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21384. |
|
Hi, |


Pull Request for Issue #21249 .
Summary of Changes
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'
Testing Instructions
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)
Expected result
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.'
