Skip to main content
edited tags; edited title
Link
FFrewin
  • 19.8k
  • 10
  • 48
  • 101

Joomla Search Result Article Text Length: Text is Truncatedtruncated in strange places

Source Link
sifu
  • 1.1k
  • 10
  • 22

Joomla Search Result Article Text is Truncated in strange places

I am using the Joomla Search module with a Menu Item pointed to '/search'. When a search is performed, the results list a linked title, a snippet, category and the created date.

The snippet is mostly good but sometimes they are very strange and begin with '...'. I checked the results array and it does not return the fulltext of the article so there is no way to apply my own string truncate function. Here is a sample output:

<dl class="search-results">
    <dt class="result-title">
        1. <a href="/foo-bar">Foo Bar Title</a>
    </dt>
    <dd class="result-text">
        ...&nbsp;, lorem ipsum text ipsum lorem: Lorem Ipsum orem ipsum dolor sit amet, consectetur adipiscing elit....
    </dd>
    <dd class="result-created">
        Created on 26 June 2017 </dd>
</dl>

Most of the snippet output is pretty much as I expected. I checked the 'Search - Content' plugin and it is returning the full Article details.

Is this an expected behaviour as it seems like a bug to me and is there a way without having to write custom plugins to either get the fulltext if this is an expected behaviour?