We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    I developed and launched a ModX based site for a client last year, and they’re after some changes. They are responsible for the addition of content themselves, and have recently (and reasonably) asked how they can make an easy backup of their whole site, and restore it in the case of a problem. Related to this matter, they would like to be able to preview changes they make to live pages before publishing them, much like we can do with our posts to this forum.

    I did some digging through the forums here, and it seems that as of yet, there is no "client friendly" solution for these matters?

    This thread ( http://modxcms.com/forums/index.php/topic,2794.0.html ) describes an easy one-click solution for backing up a whole site, but restoring involves uploading a .zip, deleting all files on the current (live) site, and extracting the backup via the host’s control panel. On a live site, this is not an answer, and my client would justifyably be overwhelmed by the procedure.

    This thread ( http://modxcms.com/forums/index.php/topic,17499.0.html ) says that ModX version 0.9.7 would have version control features, but that was posted almost a year ago. Is 0.9.7 close, or are there any alternative solutions with 0.9.6?

    Are there any better options available for these realistically essential features?

    Thanks in advance for your help!
      • 25663 MODX Staff
      • 12,272 Posts
      Currently there aren’t really click-and-smile solutions available as you’ve found out. There is a new versioning effort underway by one of the community members for the 096x branch, but it’s not complete either.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 34017
        • 898 Posts
        For quick preview, you could create 2 tvs:
        1. checkbox, called show_preview
        2. create a RTE called test_preview

        Then use phx to say [+phx:if=`[*show_preview*]:is`1`:and:mo=`Admins`:then=[*test_preview*]:else=[*content*]+]

        They can preview, edit. When they get it looking right, they can cut-paste the test_preview into content and uncheck ’show_preview’. It’s not versioning and rollback but its a quick fix that most CMS’ cant do (i think) (i know joomla cant)
          Chuck the Trukk
          ProWebscape.com :: Nashville-WebDesign.com
          - - - - - - - -
          What are TV's? Here's some info below.
          http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
          http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
          • 21112
          • 156 Posts
          Thanks for the help folks. Sorry to hear there’s no great solution at the moment. Is there an expected launch date for 0.9.7? It would be good to let the client know when they might be able to get these features.

          ProWebScape - that’s a fascinating and very clever solution. It’s not ideal, but definately better than nothing. I’ll suggest it to the client. I might need some help to get it working, but I’ll give it a shot myself first.

          Thanks again!
            • 4971
            • 964 Posts
            What is an RTE?
              Website: www.mercologia.com
              MODX Revo Tutorials:  www.modxperience.com

              MODX Professional Partner
              • 4310
              • 2,310 Posts
              RTE = Rich Text Editor such as TinyMCE.
              Have a look at the TV [*blogContent*] that comes with the demo install of MODx to see one in action.
                • 4971
                • 964 Posts
                thanks...
                  Website: www.mercologia.com
                  MODX Revo Tutorials:  www.modxperience.com

                  MODX Professional Partner
                  • 21112
                  • 156 Posts
                  I suspected I’d need help when I came to implement this, and I was right smiley Hopefully this is just an ignorant simple mistake.

                  I’m getting an error when I load any page with the suggested phx code in place of the [*content*]. I’ve greated the Tvs as suggested, only slightly changing the name. This is the PHx code I’ve put in place of [*content*]:

                  [+phx:if=`[*show_draft*]:is`1`:and:mo=`Admins`:then=[*test_draft*]:else=[*content*]+]


                  And this is the error I get at the top of every page:

                  Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/httpd/vhosts/harryjenkins.com/httpdocs/assets/plugins/phx/phx.parser.class.inc.php(220) : eval()'d code on line 1
                  
                  Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/httpd/vhosts/harryjenkins.com/httpdocs/assets/plugins/phx/phx.parser.class.inc.php(226) : eval()'d code on line 1


                  I can’t send an example link, because this is on a live site, and I had to replace [*content*] when i saw the error.

                  Have I done something wrong?
                    • 11975
                    • 2,542 Posts
                    Hi,

                    your Phx code contains errors

                    [+phx:if=`[*show_draft*]:is`1`:and:mo=`Admins`:then=`[*test_draft*]`:else=`[*content*]`+]


                    Let us know if this fixes the problem.

                    :-)
                      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                      • 21257 MODX Staff
                      • 730 Posts
                      Quote from: heliotrope at Jun 13, 2008, 04:41 AM

                      ..
                      [+phx:if=`[*show_draft*]:is`1`:and:mo=`Admins`:then=`[*test_draft*]`:else=`[*content*]`+]
                      ..

                      There is 1 backtick and an = sign missing from that example..
                      [+phx:if=`[*show_draft*]`:is=`1`:and:mo=`Admins`:then=`[*test_draft*]`:else=`[*content*]`+]
                      

                        Mike Schell
                        Lead Developer, MODX Cloud
                        Email: [email protected]
                        GitHub: https://github.com/netProphET/
                        Twitter: @mkschell