Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • janjhnsn 7 posts 29 karma points
    Aug 05, 2011 @ 10:04
    janjhnsn
    0

    The very last word and previewing it

    Hello

    I've setup XSLTsearch and it works perfect! I only have one issue with the search and previewing the last word. For instance I have 'Fjeldsted' as the last word on one page. But the preview just shows me the first characters of the page. If I add text after the word so it isn't the last word any more the preview works fine. Is it my setup or a bug? If its my setup what am I doing wrong?

    Thanks in advance.

  • janjhnsn 7 posts 29 karma points
    Aug 05, 2011 @ 12:04
    janjhnsn
    0

    Its even the same on XSLTsearchs own website: http://www.percipientstudios.com/search.aspx?search=today!&submit.x=0&submit.y=0
    If you put just to words after ie. "Fjeldsted one two" it works with the preview.

  • janjhnsn 7 posts 29 karma points
    Aug 08, 2011 @ 17:15
    janjhnsn
    0

    Bump, anything or anyone?

  • Douglas Robar 3570 posts 4671 karma points MVP 6x admin c-trib
    Aug 11, 2011 @ 16:05
    Douglas Robar
    0

    Thanks for the bug report! Seems that faulty logic has been there for a long time and you're the first to notice.

    For anyone else who finds this, the issue only appears when:

    1. You have previewType="CONTEXT" set in your macro parameters
    2. You search for a word that appears at the end of the content and is NOT followed by a space (though other non-whitespace characters might follow the search term the important point is that there is no whitespace)

    The solution in XSLTsearch 3.0.1 is to change line 165 of the /app_code/xsltsearch.cs file (in the contextOfFind() function) from:

    string remaining = data; 

        to

     

    string remaining = data + " "

                    

     

    I'll include the fix in the next version of XSLTsearch.

    cheers,
    doug. 

  • janjhnsn 7 posts 29 karma points
    Aug 11, 2011 @ 16:33
    janjhnsn
    0

    Thanks for the reply, my client will be happy - couldn't seem to fix the error myself :)

  • janjhnsn 7 posts 29 karma points
    Aug 22, 2011 @ 15:57
    janjhnsn
    0

    Hi Doug

    Im still having problems with this. I've updated my XSLTsearch to the newest version and changed string remaining = data + " "; But the problem still appears. Do you have any idea why? Other fixes? Hehe.

  • Douglas Robar 3570 posts 4671 karma points MVP 6x admin c-trib
    Aug 22, 2011 @ 16:02
    Douglas Robar
    0

    That should work. Have you got a link where I can see it in action? (if a not-for-public-consumption site, you can use my contact form to send me the link privately at http://www.percipientstudios.com/about/contact.aspx)

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft