We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18373 ☆ A M B ☆
    • 3,141 Posts
    Please note that a lot has changed since writing this initial post.. please read through the topic, the VersionX Documentation and the VersionX Roadmap to find out where this project is heading. You may also find a login to a demo setup on the second page, first post of this topic to see it in action.

    I’ve been working on this for a lil’ while now, and just wanted to share you what I want it to do and how it works.

    Basicly, I want it to be a basic versioning addon which keeps track of modifications and allows you to put older versions back in place. That way it can, besides keeping track of what happened, also act as a sort of backup.

    Features at time of writing:
    - Record changes in documents, symlinks, static resources (the reference, not the file itself) and weblinks in the current database
    - Show all resource fields (unfortunately: no tvs yet) of a revision saved, as well as keeping track what the last revision before this revision was or new resource and the time it happened
    - Compare revisions "content" field with the prior revisions "content" field (using xpdorevisioncontrol)
    - All recording is done using xPDO/MODx objects, so it should be future proof-ish.
    - No hacking of the core.

    What still needs work before beta / pl release:
    - UI (want to do it in ModExt, but got stuck when I just couldn’t get anything on the screen :/ So using plain evil tables now)
    -- Also includes filtering options / search
    - Also record TV changes associated with a resource
    - Possibly comparing other fields, besides the content field
    - Allow comparing between different revisions, not just the prior revision
    - Change settings
    - Install via package manager (with install options?)
    - Iron out stupid bugs (like one that’s giving an error in the error log for every revision being listed...) Fixed 22/12/2010! The class_key field in the db was giving xPDO the impression it was actually a modResource. Same thing happened earlier to the content field. Renaming the field in the db/schema/modal solved the problem.
    - Clean up code

    Other features on the wishlist which may or may not make it into a beta / pl release:
    - Store data in a separate database
    - Perhaps (needs discussion) possibility to store as files to save the db/db server
    - Export/backup feature
    - Grab a copy of all existing resources upon install
    - Settings to determine which fields are visible in the main grid
    - I18n (using lexicons)
    - Keep versioning history of chunks and snippets
    - Show overview of version history for a specific resource on the resource editing page (SilverStripe-ish), on different tab if possible. (OnDocFormRender plugin)
    - Highlighting (Sticking?) certain revisions
    - (Save as draft / load draft)

    I’ve attached a few screenshots, but please bear in mind I did nothing with the UI, except for some tables to have a simple overview while working on it.


    As Versioning is a much requested feature, and people have a lot of different ideas about it, I would like to hear what your ideas are and how they relate to my progress so far. If there’s interest in the way I’m developing it, I’ll keep you guys posted on the progress and see if I can get you guys an alpha some time soon. (tho probably not this year)
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      This looks rather promising, why not toss it up gethub or something so we can help you iron out some of those bug?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 8434
        • 5 Posts
        A much needed feature. I’d be happy to do a little beta testing. Looking forward to it smiley
          - Brent
          • 11055 ☆ A M B ☆
          • 3,112 Posts
          I’ve been thinking to make one, but I don’t have much time to spare.
          I just want to comment a little, just to share a glance of my thought.

          I like Evo’s Content History.
          I even sent the author a bugfix and an improvement which were related with Evo’s new event trigger (OnManagerWelcomeHome) at that time.

          It should be simpler if you just copied the site_content table, with a Foreign Key to the original ID.
          Only that table.

          This add-on would better if it stands as a plugin, not as CMP, which is triggered by the OnDocFormRender event.
          Try that CH, you’ll understand what I mean.

          But again, hat off for your effort, man!

          BTW,
          Check the SilverStripe’s Version History. It’s also cool.
            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.
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Quote from: AMDbuilder at Dec 21, 2010, 11:44 PM

            This looks rather promising, why not toss it up gethub or something so we can help you iron out some of those bug?

            I’ll try, but a while back I couldn’t get it running somehow and gave up. Will try again sometime soon smiley


            Quote from: goldsky at Dec 22, 2010, 02:26 AM

            I like Evo’s Content History.
            I even sent the author a bugfix and an improvement which were related with Evo’s new event trigger (OnManagerWelcomeHome) at that time.

            It should be simpler if you just copied the site_content table, with a Foreign Key to the original ID.
            Only that table.
            That is exactly what I did, except that I changed the "content" field to "contentField" as having it as actual "content" seemed to be causing a bug where it would only list a few of the revisions... don’t ask me how it did that, but changing the content fields name solved that.

            I’m still thinking how to implement template variables into the mix, as they are stored separately but I’m sure very important in tracking what’s going on.

            This add-on would better if it stands as a plugin, not as CMP, which is triggered by the OnDocFormRender event.
            Try that CH, you’ll understand what I mean.
            It’s a plugin, with a CMP where you can view and compare revisions. I used the OnDocFormSave to fetch the data on save.

            Are you suggesting to list (the last x) revisions on the edit resource page? If so - sounds like a great addition to me! smiley I don’t think it will make the CMP obsolete as you can still find all revisions there and eventually be able of filtering on not only resources, but also user.

            But again, hat off for your effort, man!

            BTW,
            Check the SilverStripe’s Version History. It’s also cool.
            Thanks for the kind words laugh That makes me want to improve this thing, hehe.

            I’m trying to find an example of the way SilverStripe does it.. I see a mention somewhere it shows it on a tab on the resource edit panel from where you can easily roll back. That sure sounds feasible.



            (Taking my mind further beyond pl...)
            From there on I can imagine it would be possible to go to your "VersionX" or "Version History" tab, click a button "Save as Draft", come back the next day, go to the "VersionX" or "Version History" tab, click "Load draft (dd/mm/yyyy hh:mm)" and get back to editing where you were.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              Well,
              This add on is tight to the resources revision, not to the whole system. That’s why it’d suit better if it’s attached to the resource.

              I don’t think that having more histories for TVs or even snippets is urgent, but I think this is the reason you’d need the CMP, to diff all things around.

              Is ’cherry pick’ also available? wink
                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.
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                With including TVs I meant their values, not necessarily changes to their config, if that’s what you’re thinking. I guess it’s pretty much the content editor you linked to earlier - storing content versions.


                Things like snippets, and chunks are definitely things that should come with this later on. Wonder why I didn’t put it in my "wishlist".... laugh



                If by cherry pick you mean "highlighting" certain revisions that may be a nice addition indeed.


                Edit: Just wanted to let you know I’m finally making *some* progress with ModExt. Thanks Shamblett laugh
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 21838
                  • 284 Posts
                  Will it be available at GitHub?
                    MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    If I can get it running... yes.

                    I’ll try setting up a repo when I got time to dive in that again. For now I’m just developing in-line so to say.



                    I can see if I can wrap up a transport package next week as an alpha release, and see if I can put it on git after that.

                    I’ll also give you guys a login to my development manager so you can view it in action without having to install it. (Already set the account up, but right now it’s a big mess due to just starting with modExt)
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 21838
                      • 284 Posts
                      Sounds great! smiley Really looking forward to it.
                        MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)

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