?
avatar QuotesUK
QuotesUK
19 Jul 2018

Steps to reproduce the issue

Use search box to find keyword in title

Expected result

highlighted keyword in search result titles

Actual result

visible span class html code

System information (as much as possible)

Joomla 3.8.10

Additional comments

Clarification of #16979

I have this issue in Joomla v3.8.10

I know that previous discussion has explained how to fix this but without the context of surrounding code fragments for a "before" and "after" it is difficult working out what I need to do. Some authors have refered to modifying two files, and others in different places. Where exactly - line 19, 20, 162 or 270?

For example my file (v3.8.10) com_search/views/search/view.html.php line 162...
$result->title = $rowTitleHighLighted;

For example my file (v3.8.10) com_search/views/search/view.html.php line 270...
ksort($posCollector);

I would appreciate it someone could provide clear guidance of what is being changed and perhaps make it future proof by showing several of the existing lines of code before and after, to help us locate it. Thank you.

avatar QuotesUK QuotesUK - open - 19 Jul 2018
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jul 2018
Category com_search
avatar brianteeman
brianteeman - comment - 19 Jul 2018

As stated in the other issue. There is no issue with the core of Joomla. The issue is with an override of the defaults in your template. There is nothing that the core of Joomla can do to fix something that your template is replacing.

avatar QuotesUK
QuotesUK - comment - 19 Jul 2018

Yes, that’s perfectly understandable, however authors have described code alterations that will prevent this issue. Maybe the actual fault lies with certain templates but if the core of Joomla can be modified to prevent this issue then it works as a fix for everyone.

Personally I would rather choose a new template or fix the existing but that is not an option for me. Hence the universal fix would help. I am sure that the intention for the core Joomla code was not to show html span tags but that is what is happening.

I am not asking for this issue to be solved again, merely for clarification of which code segments (in Joomla core) can be modified to stop this issue.

avatar brianteeman
brianteeman - comment - 19 Jul 2018

You should NOT be changing anything in the core of Joomla ever!!! If you do that then you will have to do it every single time you update joomla. Also there are always specific reasons why code changes - giving the instructions you are asking for will negate those. The correct solution is to update the code in your template override. There is no other solution

avatar QuotesUK
QuotesUK - comment - 19 Jul 2018

Why so negative? A solution already exists, I am merely asking for clarification.

avatar brianteeman
brianteeman - comment - 19 Jul 2018

The solution is in my comment above. The solution is not editing core files.

avatar QuotesUK
QuotesUK - comment - 19 Jul 2018

Yes Brian, I do appreciate you have a view that the core files are sacrosanct but others (before me) have modified them. I am not trying to ask for a change to core code, just a clarification on what others have already done.

avatar brianteeman
brianteeman - comment - 19 Jul 2018

Sorry but you are not going to find instructions how to modify core files here. It is not about them being sacred. There are reasons for that code change.

avatar QuotesUK
QuotesUK - comment - 19 Jul 2018

Thank you Brian. Maybe someone else can clarify the modifications already described in #16979

avatar mbabker
mbabker - comment - 19 Jul 2018

You should modify your template's layout override for the search results page to remove the escaping of the result title as was done in the pull request which changed core, #16484

That is the only valid change to be made. There is no other change you can or should make which will fix this that is not a core hack that won't be replaced at next update.

Closing this item. There is no core issue to be addressed here.

avatar mbabker mbabker - change - 19 Jul 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-07-19 18:08:32
Closed_By mbabker
avatar mbabker mbabker - close - 19 Jul 2018

Add a Comment

Login with GitHub to post a comment