? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
29 Mar 2018

Pull Request for Issue #19518

Summary of Changes

Adding fulltext to the introtext to highlight the found term

Testing Instructions

Create an article with a readmore.
Add some text after the readmore: I used here elegant
Use smartsearch in frontend and search for elegant

Expected result

Term highlighted.

Actual result

Term not highlighted.

After patch

screen shot 2018-03-29 at 14 06 49

Documentation Changes Required

None

avatar infograf768 infograf768 - open - 29 Mar 2018
avatar infograf768 infograf768 - change - 29 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Mar 2018
Category Front End com_finder
avatar Quy
Quy - comment - 29 Mar 2018

It is possible to output invalid markup when truncated since summary and body are HTML.

description is text so not an issue.

avatar infograf768
infograf768 - comment - 29 Mar 2018

not sure i understand. description is in fact summary.
introtext is summary and body is fulltext

$item->description = FinderIndexerHelper::parse($item->summary);

FinderIndexer::TEXT_CONTEXT => array('summary', 'body'),

avatar Quy
Quy - comment - 29 Mar 2018

Here is from the Joomla! Testing article where the bulleted list is missing the beginning markup <ul>.

			<p class="result-text">
			of rendering--items not aligned correctly, missing or wrong images, pages that just don't look right.</li>
<li>Unexpected behavior--anything that is working differently than it did in 2.5.</li>
</ul>
<p>Report problems</p>
<p>If you find a problem</p>...		</p>
				<div class="small result-url">
			http://localhost/joomla-cms-staging/index.php		</div>
	</li>
	</ul>
<br id="highlighter-end" />

Add var_dump($this->result); exit; above // Make sure we highlight term both in introtext and fulltext to see the values for summary, body, and description. Only description is text where the summary and body are HTML.

avatar infograf768 infograf768 - change - 30 Mar 2018
Labels Added: ?
avatar infograf768
infograf768 - comment - 30 Mar 2018

@Quy
Understood now. Thanks.
Corrected patch.
To test, first make sure you added a readmore in that same article.
Then add a var_dump($full_description); exit; before // Find the position of the search term
Search a term which is placed after the readmore.
we now get text only.

In the screenshot below the first article has a readmore, the second one not.

screen shot 2018-03-30 at 08 27 04

avatar Quy
Quy - comment - 30 Mar 2018

I have tested this item successfully on 770422e


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

avatar Quy Quy - test_item - 30 Mar 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 30 Mar 2018

@Ooops-404
please test

avatar alikon
alikon - comment - 30 Mar 2018

I have tested this item successfully on 770422e


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

avatar alikon alikon - test_item - 30 Mar 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Mar 2018

Ready to Commit after two successful tests.

avatar mbabker mbabker - change - 1 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-01 15:32:04
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 1 Apr 2018
avatar mbabker mbabker - merge - 1 Apr 2018

Add a Comment

Login with GitHub to post a comment