[pmwiki-users] problem with pagelist and RTL search terms

Hans design1 at softflow.uk
Thu Jun 8 04:00:02 CDT 2017


I found a problem with pagelist not finding RTL search terms in pages.
xlpage-utf-8.php is included, UTF-8 characters showing and correctly
saving.
I am double puzzled because normal searches have results on my local
machine, as well as on pmwiki.org, but not on my hosted domain.

I tried analysing this a bit, but do not fathom quite how function
MakePageList() works with all the filter functions called again and
again.

Adding some 'echo' calls to function PageListProtect() to see the
building of the $opt array, I can see that with a RTL search term
PageListProtect is not going through phase 2, but through phase 1 and
phase 4. Whereas searching for a LTR term it is going through phases
1, 2 and 4, and I see the page containing the searched text term is
listed in $opt['=protectsafe'], i.e. in phase 2 (PAGELIST_ITEM) the
page name is added to this, which is not happening when searching for
an RTL term (which exists on same page). Note I just copy words from
that test page (RTL or LTR) into the search box and submit).

I will paste an example of echo returns here, first with RTL term,
then with a LTR term. echo calls where inserted at top of
PageListProtect() function:

RTL search:
=====================================
PageListProtect phase 1

opt Array
(
    [] => Array
        (
            [0] => انہیں
        )

    [#] => Array
        (
            [0] => 
            [1] => انہیں
        )

    [PHPSESSID] => e3su7573ol9gk0npp66lskvg63
    [action] => search
    [class] => fpltemplate
    [fmt] => #default
    [fn] => FPLTemplate
    [list] => default
    [o] => 
    [order] => name
    [q] => انہیں
    [req] => 1
    [request] => 1
    [wrap] => div
    [=key] => 4b23064379f35fd2f13418c5a59debd4
    [=phase] => 1
)


PageListProtect phase 4

opt Array
(
    [] => Array
        (
            [0] => انہیں
        )

    [#] => Array
        (
            [0] => 
            [1] => انہیں
        )

    [PHPSESSID] => e3su7573ol9gk0npp66lskvg63
    [action] => search
    [class] => fpltemplate
    [fmt] => #default
    [fn] => FPLTemplate
    [list] => default
    [o] => 
    [order] => name
    [q] => انہیں
    [req] => 1
    [request] => 1
    [wrap] => div
    [=key] => 4b23064379f35fd2f13418c5a59debd4
    [=phase] => 4
    [=protectexclude] => Array
        (
        )

    [=protectsafe] => Array
        (
        )

    [=pnfilter] => Array
        (
        )

    [=inclp] => Array
        (
            [0] => $انہیں$i
        )

    [=order] => Array
        (
            [name] => +
        )

    [=readc] => 0
)
================================================

LTR search:
================================================

PageListProtect phase 1

opt Array
(
    [] => Array
        (
            [0] => πρῶτα
        )

    [#] => Array
        (
            [0] => 
            [1] => πρῶτα
        )

    [PHPSESSID] => e3su7573ol9gk0npp66lskvg63
    [action] => search
    [class] => fpltemplate
    [fmt] => #default
    [fn] => FPLTemplate
    [list] => default
    [o] => 
    [order] => name
    [q] => πρῶτα
    [req] => 1
    [request] => 1
    [wrap] => div
    [=key] => 0a7fad7350a48636d83886e2cb15a723
    [=phase] => 1
)


PageListProtect phase 2

opt Array
(
    [] => Array
        (
            [0] => πρῶτα
        )

    [#] => Array
        (
            [0] => 
            [1] => πρῶτα
        )

    [PHPSESSID] => e3su7573ol9gk0npp66lskvg63
    [action] => search
    [class] => fpltemplate
    [fmt] => #default
    [fn] => FPLTemplate
    [list] => default
    [o] => 
    [order] => name
    [q] => πρῶτα
    [req] => 1
    [request] => 1
    [wrap] => div
    [=key] => 0a7fad7350a48636d83886e2cb15a723
    [=phase] => 2
    [=protectexclude] => Array
        (
        )

    [=protectsafe] => Array
        (
        )

    [=pnfilter] => Array
        (
        )

    [=inclp] => Array
        (
            [0] => $πρῶτα$i
        )

    [=order] => Array
        (
            [name] => +
        )

    [=readc] => 0
)


PageListProtect phase 4

opt Array
(
    [] => Array
        (
            [0] => πρῶτα
        )

    [#] => Array
        (
            [0] => 
            [1] => πρῶτα
        )

    [PHPSESSID] => e3su7573ol9gk0npp66lskvg63
    [action] => search
    [class] => fpltemplate
    [fmt] => #default
    [fn] => FPLTemplate
    [list] => default
    [o] => 
    [order] => name
    [q] => πρῶτα
    [req] => 1
    [request] => 1
    [wrap] => div
    [=key] => 0a7fad7350a48636d83886e2cb15a723
    [=phase] => 4
    [=protectexclude] => Array
        (
        )

    [=protectsafe] => Array
        (
            [Main.UTF-Test] => 1
        )

    [=pnfilter] => Array
        (
        )

    [=inclp] => Array
        (
            [0] => $πρῶτα$i
        )

    [=order] => Array
        (
            [name] => +
        )

    [=readc] => 1
)
=======================================




More information about the pmwiki-users mailing list