? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
14 May 2018

Summary of Changes

Make the link field required when the menu item type is URL

Testing Instructions

Before patch, one can save a menu item of type URL without any link...

After patch, it will be impossible.

avatar infograf768 infograf768 - open - 14 May 2018
avatar infograf768 infograf768 - change - 14 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 May 2018
Category Administration com_menus
avatar brianteeman brianteeman - test_item - 14 May 2018 - Tested successfully
avatar brianteeman
brianteeman - comment - 14 May 2018

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.

avatar infograf768
infograf768 - comment - 14 May 2018

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"

avatar ReLater
ReLater - comment - 14 May 2018

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:...

avatar ReLater ReLater - test_item - 14 May 2018 - Tested successfully
avatar ReLater
ReLater - comment - 14 May 2018

I have tested this item successfully on 04e9b9a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20392.

avatar Quy
Quy - comment - 14 May 2018

I vote not to validate URL. Otherwise, only absolute URLs are allowed and not relative URLs.

avatar Quy Quy - change - 14 May 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 14 May 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20392.

avatar mbabker mbabker - change - 15 May 2018
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: ? ?
avatar mbabker mbabker - close - 15 May 2018
avatar mbabker mbabker - merge - 15 May 2018

Add a Comment

Login with GitHub to post a comment