We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38118
    • 8 Posts
    I seem to be having a problem with some input and output filters after upgrading to 2.5.1.

    I have a placeholder called pages set, in my case right now to the value 2.

    If I add the place holder to a page like so, [[+pages]] the placeholder correctly displays as 2, but with any filter applied I get nothing.

    So [[+pages:gt=`1`:then=`Anything at all here`]] or [[+pages:eq=`2`:then=`Anything at all here`]] gives me nothing. It was working fine before I upgraded to 2.5.1. I didn't change any of the code on the page, I just noticed that parts of my pages were missing.

    Anyone else have any problems with this? Any ideas would be appreciated.

    This question has been answered by cbalfour. See the first response.

      • 28432
      • 372 Posts
      Hi,

      Maybe you can get around the problem with IF Extra like this :

      [[!If? &subject=`[[+page]]` &operator=`gt` &operand=`1` &then=`Anything at all here`]]

      OR
      [[!If? &subject=`[[+page]]` &operator=`eq` &operand=`2` &then=`Anything at all here`]]


      I hope this help.
        • 3749
        • 24,544 Posts
        First, try deleting all files in the core/cache directory to see if that fixes things.

        If not, I'd do it with a custom snippet. Can you say more about what you need to do? How many page options are there?
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • discuss.answer
          • 38118
          • 8 Posts
          Quote from: BobRay at Oct 03, 2016, 08:30 PM
          First, try deleting all files in the core/cache directory to see if that fixes things.

          If not, I'd do it with a custom snippet. Can you say more about what you need to do? How many page options are there?

          Thanks BobRay. I did delete all the files in the core cache file with no result. I also tried making a new page with similar code, and changing the name of the placeholder, also on a new page, with the same result.

          I managed to fix it without needing a custom snippet merely by running it uncached (Adding the ! to the front). That also was able to get it working when I made that change to the test pages. I also found a couple instances of custom snippets with output filters that stopped working after the update that were also fixed by running them uncached.

          When I have a little time I am going to try it in another environment to see if I can recreate/fix it. I still have backups of the site and database from before the update. Maybe something just glitched on the update.

          But anyway, it is working for the time being.

          Thanks BobRay and Steve for your time and suggestions.

            • 38118
            • 8 Posts
            Quote from: Steeve at Oct 03, 2016, 01:38 PM
            Hi,

            Maybe you can get around the problem with IF Extra like this :

            [[!If? &subject=`[[+page]]` &operator=`gt` &operand=`1` &then=`Anything at all here`]]

            OR
            [[!If? &subject=`[[+page]]` &operator=`eq` &operand=`2` &then=`Anything at all here`]]


            I hope this help.

            Thanks Steve. This was going to be my fallback, but I managed to get it working. See my reply to BobRay. Thanks for your time and suggestion. I appreciate it.