User tests: Successful: Unsuccessful:
Make the link
field required when the menu item type is URL
Before patch, one can save a menu item of type URL without any link...
After patch, it will be impossible.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus |
What do you think about adding validate="url"
, i.e. in code
$this->form->setFieldAttribute('link', 'validate', 'url');
easy enough
EDIT: hmm, not sure it would be enough
maybe rather
filter="url"
Because some people use URL item type with urls like #jumpto2
filter
would be too hard and not B\C. Concerning validate
I don't know.
BTW: I've added
$this->form->setFieldAttribute('link', 'validate', 'url');
and
$this->form->setFieldAttribute('link', 'filter', 'url');
to your PR code and looks like none of them work. No filtering. Only when I enter filter="xml"
in the item.xml I see a filter warning. validate="url"
there doesn't do anything.
Invalid URL: URL schema is missing in #jump2. Please add one of the following at the beginning:...
I have tested this item
I vote not to validate URL. Otherwise, only absolute URLs are allowed and not relative URLs.
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-15 22:56:59 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
?
|
I have tested this item✅ successfully on 04e9b9a
works as described
it would be good to have some real validation here and not just testing thta there is anything in the field
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20392.