The error message should show the correct field name.
Wrong field name show in error message.
@astridx
Have you entered a blank space in the field before saving? If you do, then you will get the error Menu type empty.
To avoid this scenario, we can use this patch to get the Field required: Unique Name
as anyway it is not a good idea to have some spaces around the Unique name.
diff --git a/administrator/components/com_menus/Controller/MenuController.php b/administrator/components/com_menus/Controller/MenuController.php
index 984bcc1..b3736c0 100644
--- a/administrator/components/com_menus/Controller/MenuController.php
+++ b/administrator/components/com_menus/Controller/MenuController.php
@@ -13,4 +13,5 @@
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
@@ -71,4 +72,6 @@
}
+ $data['menutype'] = InputFilter::getInstance()->clean($data['menutype'], 'TRIM');
+
// Populate the row id from the session.
$data['id'] = $recordId;
@infograf768 I was sure that I entered a space - but I probably do not have this. I just tested it again and now I can confirm the issue.
will make PR later.
@infograf768 did you forget or was there a difficulty
Closed_By | alikon | ⇒ | joomla-cms-bot |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-12-03 16:35:02 |
Closed_By | ⇒ | alikon |
Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/26948
please test #27206
@infograf768 did you forget or was there a difficulty
I just forgot... Thanks @alikon
I guess we have to trim
$data['menutype'])
to make sure it never tries to save the field with a blank space.If trimmed, the error will be
Field required: Unique Name