We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26868
    • 15 Posts
    Hi all !

    I’ve spent some time to finally figure out where is my problem, but I do not understand why :
    I’ve a page -uncached- with a maxigallery snippet :
    [[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` ]]


    If I’ve this snippet only, it works fine.
    If I add a jot snippet call after Maxigallery :
    [!Jot? &subscribe=`1` &pagination=`10` &canmoderate=`SiteAdmins` !]


    Then the page displayed is fully blank, no html, 0 byte long : modx returns nothing.
    I’ve tested with jot alone, it works fine, maxigallery alone : fine.

    I’ve played with all the possibilities of [[ or [! and it’s partially working with this settings :
    blablabla
    [!MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` !]
    blablabla
    [[Jot? &subscribe=`1` &pagination=`10` &canmoderate=`SiteAdmins` ]]

    which is exactly the contrary of the ’normal’ way and
    it displays some template code inside my page : you can see the result here :
    http://www.chiroux.com/testgallery.html

    I’m using maxigallery 0.5 BETA 2 Rev 49, Jot 1.0 and Modx 0.9.5


    edit: I did not see before the post from Dr. Scotty Delicious here :
    http://modxcms.com/forums/index.php/topic,9258.msg68419.html#msg68419

    It seems to be the same problem..
      • 7923
      • 4,213 Posts
      Yeah, there is some issues with MaxiGallery/Jot/PHx combo right now.. I don’t know what’s causing it, but I suspect it has something to do with PHx.. Bs was supposed to be looking into it, but he’s been busy with other stuff and this has probably been forgotten, I’ll notify him about it again..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 26868
        • 15 Posts
        I’ve installed the lastest version of PHx (i did not installed it before, i was using the ’internal’ implementations).

        I still have the same problem, but I don’t have template code inside my page anymore ! (using [! !] for maxigallery and [[ ]] for jot)
          • 7923
          • 4,213 Posts
          Yeah, installing PHx as plugin does not help with this, I know.. Until Bs has time to look at it, could you check the event log from MODx manager and see if there’s something to use.. (clear it first, then refresh the page and see what comes up)


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 26868
            • 15 Posts
            I’ve 2 pages :
            http://www.chiroux.com/testgallery.html : the ’working’ page with [!MaxiGallery... and [[Jot?
            http://www.chiroux.com/testgallery2.html : the ’blank’ page with [[MaxiGallery... and [!Jot?

            Without debug enabled for PHx, I do not have any log for any page.
            With debug enable for Phx, here are the result (condensed)

            testgallery.html : 4 log entries :
            1) ID event : 1
            Pass 1
            
            1 [19:27:29] MODx Chunks -> Merging all chunk tags


            2) ID event : 4
            Pass 1
            
            1 [19:27:29] MODx Chunks -> Merging all chunk tags
            2 [19:27:29] MODx Snippet -> DropMenu?startDoc=`40`
            3 [19:27:29]   |--- Returns: 
            
            4 [19:27:29] MODx Snippet -> tagcloud?parent=`2,42,45,52,47,55` &min=`8` &minsize=`4` &fontmin=`30` &fontmax=`250` &landing=`40`
            5 [19:27:29]   |--- Returns: 
            <div class="tagcloud"><span><abbr title="(rencontré 10 fois)" style="border-bottom: none;"><a style="font-size:50%;" href="[~40~]&FSF_search=également">également</a></abbr></span> </div>
            
            6 [19:27:29] MODx Snippet -> NewsListing? &startID=`2` &start =`4` &summarize=`3` &trunc=`true` &total=`3` &showarch=`false`
            7 [19:27:29]   |--- Returns: 
            <div class="nl_summaryPost"> <h3><a href="[~82~]">Changement du système de commentaires</a></h3> <div>Suite à l'upgrade à la dernière version de Modx, j'ai décidé de changer de système pour les commentaires. Je passe maintenant au module Jot! L'avantage principal pour chacun est que vous pouvez maintenant poster un commentaire sans être enregistré dans le site. Enjoy!</div> <p><a href="[~82~]">Voir la suite...</a></p> <div style="text-align:right;">par <strong>Thomas</strong> le 30/Dec/06 02:18</div> </div> 
            8 [19:27:29] MODx Setting variable: etomite_charset
            9 [19:27:29]   |--- Input = 'UTF-8'
            10 [19:27:29] MODx Setting variable: site_name
            11 [19:27:29]   |--- Input = '.: chiroux.com :.'
            12 [19:27:29] MODx TV/DV: pagetitle
            13 [19:27:29]   |--- Input = 'testgallery'
            14 [19:27:29] MODx Setting variable: site_start
            15 [19:27:29]   |--- Input = '1'
            16 [19:27:29] MODx Setting variable: site_name
            17 [19:27:29]   |--- Input = '.: chiroux.com :.'
            18 [19:27:29] MODx TV/DV: longtitle
            19 [19:27:29]   |--- Input = ''
            20 [19:27:29] MODx TV/DV: introtext
            21 [19:27:29]   |--- Input = ''
            22 [19:27:29] MODx TV/DV: content
            23 [19:27:29]   |--- Input = 'Images blablabla:<br />[!MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` !]<br /><br />Comments blablabla:<br />[[Jot? &subscribe=`1` &captcha=`1`  &pagination=`10` &notify=`2` &canmoderate=`SiteAdmins`]]'
            24 [19:27:29] MODx Setting variable: site_name
            25 [19:27:29]   |--- Input = '.: chiroux.com :.'
            Pass 2
            
            26 [19:27:29] MODx Chunks -> Merging all chunk tags
            27 [19:27:29] MODx Snippet -> Jot? &subscribe=`1` &captcha=`1`  &pagination=`10` &notify=`2` &canmoderate=`SiteAdmins`
            28 [19:27:29]   |--- Returns: 
            <a name="jf0e31e5f8"></a> <br /> <h2>Ecrivez un commentaire</h2> <div class="jot-list"> <ul> <li>Les champs obligatoires sont marques d'une <b>*</b>. </ul> </div> <form method="post" action="/testgallery.html#jf0e31e5f8" class="jot-form"> <fieldset> <input name="JotForm" type="hidden" value="0e31e5f817cc19eaf8ac7f82433b4dcf" /> <input name="JotNow" type="hidden" value="521457579" /> <input name="parent" type="hidden" value="" /> <label for="title">Sujet:<br /> <input tabindex="521457582" name="title" type="text" size="70" value="" /> </label> <label for="content">Commentaire: *<br /> <textarea tabindex="521457583" name="content" cols="70" rows="6"></textarea> </label><br /> <div style="width:150px;margin-top: 5px;margin-bottom: 5px;"><a href="/testgallery.html"><img src="/manager/includes/veriword.php?rand=521457579" width="148" height="60" alt="Si vous avez du mal a lire le code, cliquez sur l'image du code pour en generer une nouvelle." style="border: 1px solid #003399" /></a></div> Code de securite:<br /><input type="text" name="vericode" style="width:150px;" size="20" />  <div style="float:right;width: 100px;"></div> <input tabindex="521457584" name="submit" type="submit" value="Poster le Commentaire" /> </fieldset> </form> <div class="jot-list"> <ul> <li><a href="/testgallery.html?jot0e31e5f8=subscribe#jf0e31e5f8" onclick="return confirm('Are you sure you wish to enable notification of new replies for this topic?');">Subscribe</a> to new replies.</li> </ul> </div><a name="jotmod0e31e5f8"></a> <div class="jot-list"> <b>Moderation:</b> <ul> <li>You are currently viewing <b>mixed</b> comments.</li> <li>View <a href="/testgallery.html?jv0e31e5f8=0#jotmod0e31e5f8">unpublished</a> comments (0)</li> <li>View <a href="/testgallery.html?jv0e31e5f8=1#jotmod0e31e5f8">published</a> comments (0)</li> </ul> </div>
            
            Pass 3
            
            29 [19:27:29] MODx Chunks -> Merging all chunk tags
            Pass 4
            
            30 [19:27:29] MODx Chunks -> Merging all chunk tags


            3) ID Event : 1
            Pass 1
            
            1 [19:27:30] MODx Chunks -> Merging all chunk tags


            4) ID Event : 3
            [19:27:29] MODx Chunks -> Merging all chunk tags
            2 [19:27:29] MODx Snippet -> ChooseCSS
            3 [19:27:29]   |--- Returns: 
            perso
            
            4 [19:27:29] MODx Snippet -> DropMenu? &selfAsLink=`true` &hereClass=`menuactive` &topnavClass=`primary-nav`
            5 [19:27:30]   |--- Returns: 
            <ul class="primary-nav"> <li><a href="[~1~]" title="bienvenue">Home</a></li> <li><a href="[~2~]" title="">Blog</a></li> <li class="menuactive"><a href="[~48~]" title="Quelques photos">Photos</a> <ul> <li><a href="[~50~]" title="">Gouttes</a></li> <li class="last"><a href="[~49~]" title="">Paris by Night</a></li> </ul> </li> <li><a href="[~47~]" title="">Articles</a> <ul> <li><a href="[~42~]" title="">PC</a> <ul> <li><a href="[~43~]" title="">Echangeur liquide</a></li> <li class="last"><a href="[~44~]" title="Tests de découpe d'un échangeur dans un bloc d'aluminium.">Bloc d'Alu pour réaliser un échangeur</a></li> </ul> </li> <li><a href="[~45~]" title="">Plongée</a> <ul> <li class="last"><a href="[~46~]" title="">Réalisation d'un phare à LEDs</a></li> </ul> </li> <li><a href="[~52~]" title="">BD</a></li> <li class="last"><a href="[~55~]" title="Des articles concernant le d�?©veloppement web ou autre">Dev</a> <ul> <li><a href="[~69~]" title="">Macros Outlook</a></li> <li><a href="[~78~]" title="">Un script en python pour vérifier ses sauvegardes</a></li> <li class="last"><a href="[~56~]" title="Réalisation d'un formulaire Ajax, Php et Mysql">Un Formulaire en Ajax</a></li> </ul> </li> </ul> </li> <li class="last"><a href="[~4~]" title="">Connexion</a></li> </ul>
            
            6 [19:27:30] MODx Snippet -> MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` 
            7 [19:27:30]   |--- Returns: 
            <center><form action="/testgallery.html" method="post" name="activateadminform"><input type="hidden" name="mode" value="admin" /><input type="submit" value="Manage pictures" /></form></center> <br /> <div class="thumbs"> <div> <a href="/assets/galleries/88/chili.jpg" rel="lightbox[maxigallery]" title=" - "> <img src="/assets/galleries/88/tn_chili.jpg" class="thumbnail" title=" » Click to zoom ->" alt=" » Click to zoom ->" /> </a> <p> </p> </div> </div>
            
            8 [19:27:30] MODx Snippet -> AjaxSearch? &AS_landing =`40` &ajaxSearchType=`1` 
            9 [19:27:30]   |--- Returns: 
            <form id="ajaxSearch_form" action="[~88~]" method="post"> <label for="ajaxSearch_input"><input id="ajaxSearch_input" type="text" name="search" value="Cherchez ici..." onfocus="this.value=(this.value=='Cherchez ici...')? '' : this.value ;" /></label> <label for="ajaxSearch_submit"><input id="ajaxSearch_submit" type="submit" name="sub" value="Go!" /></label></form> <p class="ajaxSearch_intro" id="ajaxSearch_intro">Entrez le texte à rechercher dans la zone ci-dessus pour lancer la recherche.</p><div id="ajaxSearch_output" style="display:none;"> </div>
            
            10 [19:27:30] MODx Snippet -> WebLogin? &tpl=`WebLoginSideBar` &loginhomeid=`2`
            11 [19:27:30]   |--- Returns: 
            <script type="text/JavaScript"> function getElementById(id){ var o, d=document; if (d.layers) {o=d.layers[id];if(o) o.style=o}; if (!o && d.getElementById) o=d.getElementById(id); if (!o && d.all) o = d.all[id]; return o; } function webLoginShowForm(i){ var a = getElementById('WebLoginLayer0'); var b = getElementById('WebLoginLayer2'); if(i==1 && a && b) { a.style.display="block"; b.style.display="none"; document.forms['loginreminder'].txtpwdrem.value = 0; } else if(i==2 && a && b) { a.style.display="none"; b.style.display="block"; document.forms['loginreminder'].txtpwdrem.value = 1; } }; function webLoginCheckRemember () { if(document.loginfrm.rememberme.value==1) { document.loginfrm.rememberme.value=0; } else { document.loginfrm.rememberme.value=1; } } function webLoginEnter(nextfield,event) { if(event && event.keyCode == 13) { if(nextfield.name=='cmdweblogin') { document.loginfrm.submit(); return false; } else { nextfield.focus(); return false; } } else { return true; } } </script> <div id='WebLoginLayer0' style='position:relative'> <!-- login form section--> <form method="post" name="loginfrm" action="/testgallery.html" style="margin: 0px; padding: 0px;"> <input type="hidden" value="0" name="rememberme"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><b>User:</b></td> <td><input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" size="5" style="width: 100px;" value="" /></td> </tr> <tr> <td><b>Password:</b></td> <td><input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" size="5" style="width: 100px;" value="" /></td> </tr> <tr> <td><label for="chkbox" style="cursor:pointer">Remember me:  </label></td> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" onClick="webLoginCheckRemember()" /></td> <td align="right"> <input type="submit" value="Login" name="cmdweblogin" /></td> </tr> </table> </td> </tr> <tr> <td colspan="2"><a href="#" onclick="webLoginShowForm(2);return false;">Forget Password?</a></td> </tr> </table> </td> </tr> </table> </form> </div><div id='WebLoginLayer2' style='position:relative;display:none'> <!-- Password reminder form section --> <form name="loginreminder" method="post" action="/testgallery.html" style="margin: 0px; padding: 0px;"> <input type="hidden" name="txtpwdrem" value="0" /> <table border="0"> <tr> <td>Enter the email address of your account <br />below to receive your password:</td> </tr> <tr> <td><input type="text" name="txtwebemail" size="24" /></td> </tr> <tr> <td align="right"><input type="submit" value="Submit" name="cmdweblogin" /> <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" /></td> </tr> </table> </form> </div> <script type="text/javascript"> if (document.loginfrm) document.loginfrm.username.focus(); </script>
            
            12 [19:27:30] MODx Snippet -> ChooseCSS
            13 [19:27:30]   |--- Returns: 
            perso
            
            Pass 2
            
            14 [19:27:30] MODx Chunks -> Merging all chunk tags
            Pass 3
            
            15 [19:27:30] MODx Chunks -> Merging all chunk tags


            testgallery2.html : 2 log entries :

            1) IDEvent : 1
            Pass 1
            
            1 [19:32:27] MODx Chunks -> Merging all chunk tags


            2) IDEvent : 4
            Pass 1
            
            1 [19:32:26] MODx Chunks -> Merging all chunk tags
            2 [19:32:26] MODx Snippet -> DropMenu?startDoc=`40`
            3 [19:32:26]   |--- Returns: 
            
            4 [19:32:26] MODx Snippet -> tagcloud?parent=`2,42,45,52,47,55` &min=`8` &minsize=`4` &fontmin=`30` &fontmax=`250` &landing=`40`
            5 [19:32:26]   |--- Returns: 
            <div class="tagcloud"><span><abbr title="(rencontré 10 fois)" style="border-bottom: none;"><a style="font-size:50%;" href="[~40~]&FSF_search=également">également</a></abbr></span>  </div>
            
            6 [19:32:26] MODx Snippet -> NewsListing? &startID=`2` &start =`4` &summarize=`3` &trunc=`true` &total=`3` &showarch=`false`
            7 [19:32:26]   |--- Returns: 
            <div class="nl_summaryPost"> <h3><a href="[~82~]">Changement du système de commentaires</a></h3> <div>Suite à l'upgrade à la dernière version de Modx, j'ai décidé de changer de système pour les commentaires. Je passe maintenant au module Jot! L'avantage principal pour chacun est que vous pouvez maintenant poster un commentaire sans être enregistré dans le site. Enjoy!</div> <p><a href="[~82~]">Voir la suite...</a></p> <div style="text-align:right;">par <strong>Thomas</strong> le 30/Dec/06 02:18</div> </div> 
            8 [19:32:26] MODx Setting variable: etomite_charset
            9 [19:32:26]   |--- Input = 'UTF-8'
            10 [19:32:26] MODx Setting variable: site_name
            11 [19:32:26]   |--- Input = '.: chiroux.com :.'
            12 [19:32:26] MODx TV/DV: pagetitle
            13 [19:32:26]   |--- Input = 'testgallery2'
            14 [19:32:26] MODx Setting variable: site_start
            15 [19:32:26]   |--- Input = '1'
            16 [19:32:26] MODx Setting variable: site_name
            17 [19:32:26]   |--- Input = '.: chiroux.com :.'
            18 [19:32:26] MODx TV/DV: longtitle
            19 [19:32:26]   |--- Input = ''
            20 [19:32:26] MODx TV/DV: introtext
            21 [19:32:26]   |--- Input = ''
            22 [19:32:26] MODx TV/DV: content
            23 [19:32:26]   |--- Input = 'Images blablabla:<br />[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` ]]<br /><br />Comments blablabla:<br />[!Jot? &subscribe=`1` &captcha=`1`  &pagination=`10` &notify=`2` &canmoderate=`SiteAdmins`!]'
            24 [19:32:26] MODx Setting variable: site_name
            25 [19:32:26]   |--- Input = '.: chiroux.com :.'
            Pass 2
            
            26 [19:32:26] MODx Chunks -> Merging all chunk tags
            27 [19:32:26] MODx Snippet -> MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1` 
            28 [19:32:26]   |--- Returns: 
            <center><form action="/testgallery2.html" method="post" name="activateadminform"><input type="hidden" name="mode" value="admin" /><input type="submit" value="Manage pictures" /></form></center> <br /> <div class="thumbs"> </div>
            
            Pass 3
            
            29 [19:32:27] MODx Chunks -> Merging all chunk tags
            Pass 4
            
            30 [19:32:27] MODx Chunks -> Merging all chunk tags


            Results
            The order of execution of maxygallery and jot is not the same :

            • In the 1st (working) test, Jot is executed first (in file 2) and the result is good and maxigallery is executed after (in the file 4) and the result is good.
            • In the second (not working) test, Maxigallery is executed first (in file 2) instead of Jot and the result is good.

            Pass3 and Pass4 are the same.

            But with the second not working test, it stops here and I do not undersand why.
            I can’t find another interesting log anywhere.
              • 26868
              • 15 Posts
              I thinks i’ve figured out the problem : both jot and maxigallery uses the CCchunkie class; maxigallery checks if CChunkie already exists, but not jot.
              Because [[ and [! changes the order of the execution, it works when jot executes first, but do not work when jot executes second (because CChunkie is already defined by maxigallery).

              The only thing you have to do to solve it is to add :
              if (!class_exists("CChunkie")) 
              before
               include_once($path . '/includes/chunkie.class.inc.php');
              in the constructor of CJot.

              regards,
              Thomas.
                • 7923
                • 4,213 Posts
                Oh.. did that actually work? I thought that chunkie is not even included if PHx is found as a plugin.. I guess I remember wrong then. smiley


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 23491 ☆ A M B ☆
                  • 1,056 Posts
                  Quote from: Shadock at Jan 07, 2007, 12:32 PM

                  I thinks i’ve figured out the problem : both jot and maxigallery uses the CCchunkie class; maxigallery checks if CChunkie already exists, but not jot.
                  Because [[ and [! changes the order of the execution, it works when jot executes first, but do not work when jot executes second (because CChunkie is already defined by maxigallery).

                  The only thing you have to do to solve it is to add :
                  if (!class_exists("CChunkie")) 
                  before
                   include_once($path . '/includes/chunkie.class.inc.php');
                  in the constructor of CJot.

                  regards,
                  Thomas.

                  Thanks, this fix worked for me smiley
                    Mike Reid - www.pixelchutes.com
                    MODx Ambassador / Contributor
                    [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                    ________________________________
                    Where every pixel matters.