? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
24 May 2017

When you use SearchTools and have a table header sorting option which isn't in the sorting dropdown, it will not work in 4.0. There is a JS error Cannot read property 'length' of undefined.
This PR fixes that. @dgt41 As this is your code, can you check if the fix is correct? JS isn't my strongest area ?

Summary of Changes

  • Checks if desiredOption exists before reading its property
  • Change \JHtmlSearchtools::main to use minified file
  • Change \JHtmlSearchtools::form to use the same call as ::main (was still using deprecated call)

Testing Instructions

  • Adjust the filter file (eg administrator/components/com_content/models/forms/filter_articles.xml) and remove some options from the fullordering field
  • Make sure sorting still works in extensions using Smart Search (eg com_content)

Expected result

All header sorting options work

Actual result

Header sorting options only work if they also appear in the drodwon select.

Documentation Changes Required

None

avatar Bakual Bakual - open - 24 May 2017
avatar Bakual Bakual - change - 24 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 May 2017
Category Libraries JavaScript
avatar dgt41
dgt41 - comment - 24 May 2017

My fault! The code is fine!

@wilsonge please merge this!

avatar brianteeman
brianteeman - comment - 24 May 2017

this is why relying on one person for js in j4 is a fail

avatar wilsonge wilsonge - change - 24 May 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-24 11:54:10
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 24 May 2017
avatar wilsonge wilsonge - merge - 24 May 2017
avatar wilsonge
wilsonge - comment - 24 May 2017

And that's why we're creating a javascript team ;) https://volunteers.joomla.org/teams/javascript-working-group

Add a Comment

Login with GitHub to post a comment