We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19116
    • 7 Posts
    EDIT : I found the solution. PHx plugin is the problem. It’s still weird though. If someone has an idea...
    Btw I don’t care I no longer need PHx.


    ---------

    Hi.

    I have a really weird problem.

    ■ In a page I have :
    [[Articles_Techniques? &folder=`[*Articles_Techniques*]`]]


    TV Articles_Techniques as for value @INHERIT 10 (I tried 10 and it’s alike)

    ■ In the Articles_Techniques snippet there is a whole processing with :
    $modx->getDocumentChildren( $folder, ...


    -> That doesn’t work as intended.
    -> So I did some test : in the Articles_Techniques snippet I put :
    $idbrut = $folder;
    $ids = "$idbrut";
    $id1 = 1 + "$ids"; $id1--;
    $id2 = (int) $ids;
    
    echo "IDBRUT = (::" . $idbrut . "::) type ".gettype($idbrut)."<br />";
    echo "IDS = (::" . $ids . "::) ".gettype($ids)."<br />";
    echo "ID1 = (::" . $id1 . "::) ".gettype($id1)."<br />";
    echo "ID2 = (::" . $id2 . "::) ".gettype($id2)."<br />";


    -> The out put is :
    IDBRUT = (::10::) type string
    IDS = (::10::) string
    ID1 = (::0::) integer
    ID2 = (::0::) integer


    ■ The problem is that $folder seems to contain a string with "10" value, when echoed() it show "10" but it’s not 10. It seems to be strangely encoded (I don’t know).

    See : if in the main page, I replace :
    [[Articles_Techniques? &folder=`[*Articles_Techniques*]`]]

    BY
    [[Articles_Techniques? &folder=`10`]]

    IT WORKS.

    ■ I tried ut8_encode, utf_decode and settype on $folder and that didn’t work.


    Anyone can help please ?

    ----

    Some informations :

    [] Web Server: Apache/2.2.8 (Win32) PHP/5.2.5
    [] MySQL version 5.0.45
    * without strict_mode
    * with UTF-8 Unicode
    * tables with ut8_general_ci
    [] Modx configured with utf-8 (I have no accents problem at all)
    * Plugins : DirectResize and PHx in addition of basics ones shipped with modx
    [] Browser/Client:
    * Firefox 2 abd IE6
    * Windows XP Pro