We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    Let’s fix the template switcher plugin and not distribute Disable Cache. Anyone care to give it a quick go?
    Commit #1818 smiley All I’ve done is implemented the one line of code from the Disable Cache plugin in the TemplateSwitcher plugin and updated the necessaries in the install. I’ve also modified the install so that it sets up the &useCookie config option for the plugin automatically.
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 26435
      • 1,193 Posts
      nice Garry!. you are fast. that is what I was working on wink

      -sD-
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Quote from: garryn at Oct 27, 2006, 01:57 PM

        Commit #1818 smiley All I’ve done is implemented the one line of code from the Disable Cache plugin in the TemplateSwitcher plugin and updated the necessaries in the install. I’ve also modified the install so that it sets up the &useCookie config option for the plugin automatically.
        	$modx->documentObject['cacheable'] = 0;
        

        I think all that will do is prevent the "new" version of the document from being cached, it will not stop the parser from getting an already cached version (with the original template) and ignoring the template switch, since if there’s a cached version it stop parsing.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 33337
          • 3,975 Posts
          @Doc Manger: Garry, if we make "Close Doc Manager" to go on home/welcome page, instead of "Manage Modules" ?

          Other than that I am using rev1817 for a new site, and so far no error occurred to me.

          Thanks.

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 25663 MODX Staff
            • 12,272 Posts
            I think the Doc Manager when closed should return to the Manage Modules page, but I could easily be convinced otherwise.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 15987
              • 786 Posts
              Susan,
              Had an idea on the weblinks when I saw this.

              Of course, this will break if you later switch from/to friendly URLs, but you can at least then go back and change the links in your internal weblinks if you have to.

              Couldn’t we just have the save processor change any numbers into links like [~docid~]?

              That way the link would work regardless of what settings were changed. I haven’t tried this, but I think that would also work.
                • 22815
                • 1,097 Posts
                Quote from: rthrash at Oct 27, 2006, 12:33 AM

                Paul and Toby: how’s the permissions review and overhaul coming (nice addition a few posts back Toby).

                Unfortunately I’ve not been well *and* I’ve been particularly busy at work. I will be able to sort this all out by Monday.

                Quote from: rthrash at Oct 27, 2006, 12:33 AM

                Finally, there’s been more additions and alterations to the language files so it might behoove us to slim down the number of default languages to ensure we have complete sets and no snippets fail. (Speaking of which, all languages should default back to English if the native one is not available I suppose ... but do they?) If we need to trim some languages out for the release, which ones are critical other than English and French (since I know those two are effectively complete now)?
                When I regenerated the lang files, I mistakenly didn’t include the include-English bit, because all the language strings were there at that time (as the English text was added to the foreign files) and to be honest I wasn’t expecting many extra strings to be added. This does need readding, and would presumably stop snippets from failing.

                While there is some logic behind not including incomplete language files in the download, if a German upgrades from 0.9.2.1 or from a 0.9.5 beta, he’ll have his old lang file, which is probably worse than a lang file that we’ve tested and upgraded. So "every language that has previously been released" is critical.

                Quote from: zi at Oct 28, 2006, 05:31 AM

                @Doc Manger: Garry, if we make "Close Doc Manager" to go on home/welcome page, instead of "Manage Modules"
                I don’t actually understand what the point of "Close Doc Manager" is. No other screen has this, although they do have "Cancel". In other screens, "Cancel" takes you to home/welcome page (although Polls Module goes to the Manage Modules screen). So, it would seem that the most consistent thing is "Cancel" > home/welcome.

                Finally...

                Quote from: sottwell at Oct 28, 2006, 03:45 AM

                I think all that will do is prevent the "new" version of the document from being cached, it will not stop the parser from getting an already cached version (with the original template) and ignoring the template switch, since if there’s a cached version it stop parsing.

                Getting template switching to work would be very very cool. This is a very MODx thing. It would also make it easier to have a parallel mobile/PSP/webTV site from the same document data.

                But the caching is also crucial to MODx. So... simple idea.. don’t know how easy it is to code, but it seems the logical solution:

                Change the caching to save out on a per-document AND per-template basis. Parser looks for a cached version of that document/template combination; if it’s there, uses it, if it’s not, parses and saves. Simple. Logical. What people might expect. I can’t really see any point expending energy on any bundled solution that isn’t this.

                (I know that’s a fairly major change to the core, but it would open up a few things, not least simplifying my upcoming PDF plugin).
                  No, I don't know what OpenGeek's saying half the time either.
                  MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                  Forum: Where to post threads about add-ons | Forum Rules
                  Like MODx? donate (and/or share your resources)
                  Like me? See my Amazon wishlist
                  MODx "Most Promising CMS" - so appropriate!
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Getting template switching to work would be very very cool. This is a very MODx thing. It would also make it easier to have a parallel mobile/PSP/webTV site from the same document data.

                  But the caching is also crucial to MODx. So... simple idea.. don’t know how easy it is to code, but it seems the logical solution:

                  Change the caching to save out on a per-document AND per-template basis. Parser looks for a cached version of that document/template combination; if it’s there, uses it, if it’s not, parses and saves. Simple. Logical. What people might expect. I can’t really see any point expending energy on any bundled solution that isn’t this.

                  (I know that’s a fairly major change to the core, but it would open up a few things, not least simplifying my upcoming PDF plugin).
                  I like the idea a lot, but do not think it’d be wise to delay 095 for this. But this also raised a question I’d not previously considered: Are the alternate templates for every web surfer, or just for the per-visitor choice?

                  If it’s one-for-all-all-for-one, I think we’ve got a serious problem on our hands. Using Paul’s example, the next person to hit site/page gets the PDF/Mobile Phone version of the site, and not just their preference, or the webmaster’s intended default site template.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 25663 MODX Staff
                    • 12,272 Posts
                    When I regenerated the lang files, I mistakenly didn’t include the include-English bit, because all the language strings were there at that time (as the English text was added to the foreign files) and to be honest I wasn’t expecting many extra strings to be added. This does need readding, and would presumably stop snippets from failing.

                    While there is some logic behind not including incomplete language files in the download, if a German upgrades from 0.9.2.1 or from a 0.9.5 beta, he’ll have his old lang file, which is probably worse than a lang file that we’ve tested and upgraded. So "every language that has previously been released" is critical.
                    Makes sense and agreed. There will be even more language additions as bug reports of other hard coded strings get committed over the weekend (likely within 12 hours).

                    I don’t actually understand what the point of "Close Doc Manager" is. No other screen has this, although they do have "Cancel". In other screens, "Cancel" takes you to home/welcome page (although Polls Module goes to the Manage Modules screen). So, it would seem that the most consistent thing is "Cancel" > home/welcome.
                    Fair enough and convinced. Let’s make it consistent across the board though... and remove the close button if possible (but there may be a reason for it?).
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Quote from: rthrash on Yesterday at 12:33 AM
                      Paul and Toby: how’s the permissions review and overhaul coming (nice addition a few posts back Toby).

                      Unfortunately I’ve not been well *and* I’ve been particularly busy at work. I will be able to sort this all out by Monday.

                      Hope you’re feeling better Paul! Does by Monday mean end of day Monday or end of day (your time) Sunday. If the later, then we should be able to hopefully hit an internal RC on Monday! laugh
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me

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