? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
20 May 2017

Create an article with the following markup

<p><b>D</b>octor <b>W</b>ho</p>
<h1>Title</h1><p>Paragraph</p>

run smart search to create an index and then use the smart search module or component on the front end to perform the following searches

  1. Doctor
  2. Title

Expected behaviour

Doctor and Title are found

Actual behaviour

Only title is found because it has been indexed as D and octor

Apply PR

Both Doctor and Title are found

The search for title should result in Title paragraph with a space between them - this is test is to ensure that existing functionality before this pr has not been changed

Pull Request for Issue #7927 .

avatar brianteeman brianteeman - open - 20 May 2017
avatar brianteeman brianteeman - change - 20 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 May 2017
Category Administration com_finder
avatar brianteeman brianteeman - change - 20 May 2017
Labels Added: ?
avatar brianteeman
brianteeman - comment - 20 May 2017

I am guessing that there should be unit tests for this ? @rdeutz but I wouldnt know where to start

avatar rdeutz
rdeutz - comment - 21 May 2017

test are failing because after your change

<h1>Main title</h1>immediately followed by some text.

is converted to

Main titleimmediately followed by some text.

I have my doubts that you can make both cases work

avatar brianteeman
brianteeman - comment - 21 May 2017

That is because i believe the unit test is wrong and is testing invalid markup
H1 is a block element not an inline element so the failing line in the data for the unit test is wrong
<h1>Main title</h1>immediately followed by some text.
It should be something like
<h1>Main title</h1><p>immediately followed by some text.</p>
As any other markup is invalid

If you test the sample markup in the first post you will see that it passes correctly

avatar ggppdk
ggppdk - comment - 21 May 2017

@brianteeman
@rdeutz

Can you consider this alternative ? #16165

avatar rdeutz
rdeutz - comment - 21 May 2017
<h1>Main title</h1>immediately followed by some text.

might be invalid but you would have the same effect with

<p><span class="IamABlockElement">Main title</span>immediately followed by some text.</p>

...  css
.IamABlockElement {display:block}

avatar brianteeman
brianteeman - comment - 21 May 2017

The aim of the pr was to make the indexer work with valid markup

avatar brianteeman brianteeman - change - 21 May 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-05-21 14:26:01
Closed_By brianteeman
avatar brianteeman brianteeman - close - 21 May 2017

Add a Comment

Login with GitHub to post a comment