• The on-page search works perfectly on English pages on the sites I manage; however, on Arabic pages it fails with the following console error:

    codepeople_shearch_in_place.min.js?ver=1.1.4:25 Uncaught DOMException: Failed to execute 'splitText' on 'Text': The offset 169 is larger than the Text node's length.

    Generally speaking, it gives this error for words greater than 2 characters with varying offset values. Longer words will work if they only appear once on the page. For example:

    • This works: ?? ?? (two words of 2 characters)
    • But this does not: ??? (3 letters)
    • However, this does: ?????? (appears once)

    Example pages:

    https://hcp.adhd.org.sa/ar/??????-??????-??????-????????-??-????/

    https://cpg.adhd.org.sa/ar/????????/

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @jvarn13,

    Thank you very much for using our plugin.

    Could you please install the latest plugin update (released just now) and purge your website and browser caches before testing again? Please let me know if the issue persists.

    Best regards.

    Thread Starter Jeremy Varnham

    (@jvarn13)

    Hello, and thanks for your immediate reply!

    The updated plugin no longer causes an error, and searching works correctly; however, there remains a minor issue wherein the highlighting is sometimes (unpredictably) offset by a few characters.

    Here’s an example screenshot:

    https://imgur.com/a/fHoCaHF

    Plugin Author codepeople

    (@codepeople)

    Hello @jvarn13

    My apologies for the delay in responding to your entry. Could you please install the latest plugin update (Released just now) and purge your website and browser caches before trying again?

    Best regards.

    Thread Starter Jeremy Varnham

    (@jvarn13)

    It works perfectly! Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript error with UTF-8 (Arabic) search’ is closed to new replies.