All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

A 3 dots bug?

leeaston 10 Apr 2013 08:35 question, complete

latest LS. When a search result excerpt dosen't start with 3 dots, the ending dots are replaced with …

Replies

  1. Low 10 Apr 2013 08:37

    I don't follow. What do you mean, exactly?

  2. leeaston 10 Apr 2013 08:40

  3. Low 10 Apr 2013 08:46

    Okay, so you're seeing the actual entity code instead of the result.

    In your case, what is the type of field you assigned as excerpt and formatting (if applicable)?

  4. leeaston 10 Apr 2013 08:52

    Textarea with Default Text Formatting set to XHTML.

  5. Low 10 Apr 2013 09:01

    Hmm. Can't replicate. What is the exact text in that entry's field and what is your excerpt length in your LS settings?

  6. leeaston 10 Apr 2013 09:12

    Title: Can a SARL reclaim TVA on a vehicle used for business?

    Field: We are an existing SARL in our third year. We want to buy a vehicle for the business if we buy it in the business name do we have to pay TVS? Can we reclaim TVA on fuel and offset running costs against the business? We have heard of a Loti, can you explain what this is We basically will use the vehicle for carrying spares and tools and in the summer occasionally moving people short distances.

    On other results the question mark at the end of the title is also replaced with the actual entity.

    This has only started to happen after I upgraded to the new version of LS.

  7. leeaston 10 Apr 2013 09:13

    Excerpt length is 22.

  8. Low 10 Apr 2013 09:22

    I take it you're highlighting keywords in Title and Excerpt. What is the search URI for the search when this happens?

  9. leeaston 10 Apr 2013 09:26

    Yes to the highlighting and the URI is: http://www.site.com/search/eyJjb2xsZW...

  10. Low 10 Apr 2013 09:29

    And your Results tag? Use pastie.org if you can.

  11. Low 10 Apr 2013 09:35

    Also, when you look at the page source, what is the exact HTML generated for that search excerpt?

  12. leeaston 10 Apr 2013 10:26

    Deleted

  13. Low 10 Apr 2013 11:55

    Nothing wrong there. And the raw HTML that is generated, specifically around the html-entity?

  14. leeaston 10 Apr 2013 12:03

    Good question, look at this mess. Seems the highlight mark tag has gone mad:

  15. leeaston 10 Apr 2013 12:05

    Deleted

  16. Low 10 Apr 2013 12:15

    Ah, I finally managed to reproduce it. I think "one" (which was part of the search term) was an Ignore Word, right?

    Anyways, to fix, open up ext.low_search.php (v2.3.0), and look up line #326, which reads:

    $kw = preg_replace("/\s{2,}/", ' ', $kw);


    Change that to:

    $kw = preg_replace("/\s{2,}/", ' ', trim($kw));


    ...and it should work normally again.

  17. leeaston 10 Apr 2013 12:21

    Yes, one is in there. I copied all stop word over to ignore words when I was testing.

    Thanks for the fix.