We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38556
    • 6 Posts
    =====
    MODX Revolution 2.2.2-pl (traditional)
    PHP Version 5.2.17
    5.1.41-3ubuntu12.10
    =====


    Hallo. I have som strange problems with chunks/snippets and modifiers.

    ----------------------
    This chunk works:
    [[$formtop]]

    Not this way:
    [[*id:is=`1`:then=`[[$formtop]]`]]
    ----------------------

    The chunk "formtop" is a form built with FormIt.
    And the snippets to FormIt in "formtop" gets called uncached like this
    [[!FormIt?
    //... //
    ]]

    It seems that I can´t call on a chunk cached if there is a uncached call to a snippet in the chunk.

    • [[*id:is=`1`:then=`[[$formtop]]`]] + [[!FormIt? //... // ]] = Don´work

    • [[!*id:is=`1`:then=`[[$formtop]]`]] + [[!FormIt? //... // ]] = Work

    • [[!*id:is=`1`:then=`[[$formtop]]`]] + [[FormIt? //... // ]] = Work

    • [[*id:is=`1`:then=`[[$formtop]]`]] + [[FormIt? //... // ]] = Work

    ----------------------

    Has anyone seen this issue before. Should I be able to call chunks uncached that has cached call in them?

    Best regards
    Micke
      Micke Pigment
      • 4172
      • 5,888 Posts
      Quote from: pigment at May 18, 2012, 02:57 AM
      =====
      MODX Revolution 2.2.2-pl (traditional)
      PHP Version 5.2.17
      5.1.41-3ubuntu12.10
      =====


      Hallo. I have som strange problems with chunks/snippets and modifiers.

      ----------------------
      This chunk works:
      [[$formtop]] 


      Not this way:
      [[*id:is=`1`:then=`[[$formtop]]`]] 

      ----------------------

      The chunk "formtop" is a form built with FormIt.
      And the snippets to FormIt in "formtop" gets called uncached like this
      [[!FormIt?
      //... //
      ]]


      It seems that I can´t call on a chunk cached if there is a uncached call to a snippet in the chunk.

      •
      [[*id:is=`1`:then=`[[$formtop]]`]]
      +
      [[!FormIt?  //... //  ]] 
      = Don´work

      •
      [[!*id:is=`1`:then=`[[$formtop]]`]]
      +
      [[!FormIt?  //... //  ]]
      = Work

      •
      [[!*id:is=`1`:then=`[[$formtop]]`]]
      +
      [[FormIt?  //... //  ]]
      = Work

      •
      [[*id:is=`1`:then=`[[$formtop]]`]]
      +
      [[FormIt?  //... //  ]] 
      = Work

      ----------------------

      Has anyone seen this issue before. Should I be able to call chunks uncached that has cached call in them?

      Best regards
      Micke
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        try
        [[!$formtop]]
        
          Rico
          Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
          MODx is great, but knowing how to use it well makes it perfect!

          www.virtudraft.com

          Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

          Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

          Maintainter/contributor of Babel

          Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
          • 38556
          • 6 Posts
          Yes.

          Both [[*id:is=`1`:then=`[[!$formtop]]`]] and [[!*id:is=`1`:then=`[[$formtop]]`]] works if I also have the snippet in the chunk called witch cach.

          So it seems to me that if a snippet call inside a chunk is beeing call with no cache - I also have to call the hole chunk from my HTML-doc with no cache. Otherwise the chunk call will not make any output at all for me.

          I can work like this ... just wondering if this a feature or a bug smiley

          Best regards
          Micke


            Micke Pigment
            • 38556
            • 6 Posts
            It seems like this editor is cutting my text. I like to insett

            *id:is=`1`:then=`!$formtop`

            ... with brackets on the rigtht places byt the "chunk part" is beeing cut away from my text ... ??

            This is my first post here so maybe I am doing something wrong. Tips? smiley

            /micke
              Micke Pigment
              • 22303 MODX Staff
              • 10,725 Posts
              Just put any MODX tags within code tags and it will preserve it...

              FWIW, as a general rule of thumb, you should only call things non-cacheable that you specifically want to be evaluated each and every time.