Use search box to find keyword in title
highlighted keyword in search result titles
visible span class html code
Joomla 3.8.10
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.
Labels |
Added:
?
|
Category | ⇒ | com_search |
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.
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
Why so negative? A solution already exists, I am merely asking for clarification.
The solution is in my comment above. The solution is not editing core files.
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.
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.
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.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-19 18:08:32 |
Closed_By | ⇒ | mbabker |
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.