? Success

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
24 Apr 2016

Summary of Changes

When we do not provide an ID for a select or grouped select list Joomla will create the ID based on the name of the field. The name is more permissive than an ID. We already remove brackets from the name but spaces are also not allowed in IDs. This pull request removes the spaces from the generated ID value.

Testing Instructions

  1. Add the following code to the file administrator/components/com_banners/views/banner/tmpl/edit.php after line 49
<?php echo JHtml::_(
'select.genericlist',
array(1,2),
'Desc. field',
);
?>
  1. Go to Components -> Banners
  2. Click on New
  3. Open the browser console by pressing F12 or right click and select Inspect
  4. Click on the Console tab in the Inspector
  5. Click on Save
  6. It is expected you get an error that the Name field is required but nothing happens.
  7. Look at the Console tab in Inspector and you will see the following error: Uncaught Error: Syntax error, unrecognized expression: #Desc. field-lbl
  8. Apply the patch
  9. Reload the page
  10. Click on Save
  11. You will now get the error that the Name field is required.
  12. Change is successful
avatar roland-d roland-d - open - 24 Apr 2016
avatar roland-d roland-d - change - 24 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2016
Labels Added: ?
avatar roland-d roland-d - change - 24 Apr 2016
Milestone Added:
avatar brianteeman brianteeman - change - 24 Apr 2016
Category Fields Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2016
Milestone Removed:
avatar yvesh yvesh - test_item - 24 Apr 2016 - Tested successfully
avatar yvesh
yvesh - comment - 24 Apr 2016

I have tested this item :white_check_mark: successfully on 607a42e

Tested, works as expected.

@roland-d What about the name attribute though? It still contains a space.. I know this is not important for the javascript validation, but when we do it for the id we should probably do it for the name also.

And what about filtering other special characters? In HTML 5 everything is allowed except the space, but in XHTML / HTML 4..


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

avatar roland-d
roland-d - comment - 24 Apr 2016

@yvesh Ideally we filter everything to make it adhere to the standard, not sure what the impact will be and where it may be a B/C issue. The brackets are OK for names as it constitutes an array. As for the space in and ID, you simply can't target the element, so it will never work. At least for jQuery, a space in the name doesn't seem to be a problem.

avatar andrepereiradasilva andrepereiradasilva - test_item - 24 Apr 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Apr 2016

I have tested this item :white_check_mark: successfully on 607a42e


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

avatar brianteeman brianteeman - change - 25 Apr 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 25 Apr 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 25 Apr 2016
Milestone Added:
avatar rdeutz rdeutz - close - 25 Apr 2016
avatar rdeutz rdeutz - merge - 25 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - close - 25 Apr 2016
avatar rdeutz rdeutz - reference | ca9c143 - 25 Apr 16
avatar rdeutz rdeutz - merge - 25 Apr 2016
avatar rdeutz rdeutz - close - 25 Apr 2016
avatar rdeutz rdeutz - change - 25 Apr 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-04-25 12:55:57
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2016
Labels Removed: ?
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:

Add a Comment

Login with GitHub to post a comment