We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11975
    • 2,542 Posts
    bS your plugin is a must have !!!

    will it be included in the default content of 0.9.5 ?

    :-)
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
      • 4195
      • 398 Posts
      Well.. my opinion is that it should be seperately available as a plugin.
      It could be made available in "a" distribution but not as core material wink
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 7923
        • 4,213 Posts
        I think that PHx should have it’s own support subforum before this thread goes out of hand


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 19726
          • 239 Posts
          It seems that PHx breaks uncached snippets [!!] on cached pages on my installs. I discovered that uncached snippets didn’t work at my site anymore. After some testing I discovered that disabling PHx would make everything work again.

          I made a test snippet with the code "return time();" and placed in on a cached page like this [!test!]

          Now each time when I refresh the page I get a new timestamp displayed. When I enable PHx I always get the same timestamp. When looking at the cached source in the manager it also shows the timestamp instead of the uncached snippetcall. When disabling PHx and refreshing the site everything works again.

          MODx version 0.9.2.2 (used the patch update)
          PHx 2.0.1
          if you need more info let me know.

          PS: Is there some kind of bugtracker for PHx ??

          [edit]added PHx version number[/edit]
            • 4195
            • 398 Posts
            I will try to somehow fix this in the next version.
            Although it’s better to just set the page to uncached if you are using snippets on it.. it could have some side effects.

            edit:

            I added the caching "issue" to the known issues list in the wiki documentation.
            Although the issue is by design i will try to come up with a solution to act as modx default behaviour.
              Armand Pondman
              MODx Coding Team
              :: Jot :: PHx
              • 19726
              • 239 Posts
              Since all pages on the site use a snippet of some sorts I don’t really want to have all pages uncached, just the ones where it is really needed. Most snippets just need to run once when the page is updated. Only some snippets on some pages can not be cached (think contact form etc...). I started to change the Uncached setting for all the pages that had it set until I realized that it would be about 60 pages sad So for now I just made a plugin that disables caching for all pages.

              Maybe the problem will go away when using 0.9.5 when it’s out. I will check it again then.
                • 4195
                • 398 Posts
                The problem also is in 0.9.5.. the reason why i never noticed it is because of the plugin that is in the default content of RC2 that disables the cache for all pages (for the template switcher). I have started on a fix and will release it soon. smiley
                  Armand Pondman
                  MODx Coding Team
                  :: Jot :: PHx
                  • 23050
                  • 1,842 Posts
                  Hi bS,

                  I want to do something very easy with PHx but I don’t know how to do.

                  I would like to test several ids with conditional operators. I start with :

                  [*id:is=`1`:then=`{{TitleSansParent}}`*]


                  And after, I would like to add several ids which would output {{TitleSansParent}}

                  I tried
                  [*id:is=`1`:or=`104`:then=`{{TitleSansParent}}`*]
                  [*id:is=`1,104`:then=`{{TitleSansParent}}`*]


                  but nothing worked. Is there a way to do what I want ? In fact, I don’t know how to use "or" conditional operators embarrassed
                    • 4195
                    • 398 Posts

                    Hi bS, I want to do something very easy with PHx but I don’t know how to do.....

                    the correct syntax is:

                    [*id:is=`1`:or:is=`104`:then=`{{TitleSansParent}}`*]
                    
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 4195
                      • 398 Posts
                      PHx 2.1.1 is here!

                      Fixes the snippet caching problem as posted in this thread and PHx also gains some increased performance when multiple identical modifiers are used. grin

                      Updating is recommended!
                        Armand Pondman
                        MODx Coding Team
                        :: Jot :: PHx

                      This discussion is closed to further replies. Keep calm and carry on.