We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27708 MODX Staff
    • 2,502 Posts
    @foniksonik

    I wonder if the solution for the Drafts for existing documents would require some type of DB fields for meta data relating to publication status of an existing doc.

    Stream of thought workflow:

    1. Open document to edit.
    2. Make edits.
    3. Save as draft.
    4. Triggers save of new document to drafts table with the original docid as a reference and then replaces existing document when published.
    5. Current doc gets moved to previously proposed history table.


    All fields should be stored too to account for TV settings and etc.

    This is a really very important addon for MODx. Thanks to everyone who has taken interest. Lemme know if you need UI help.

    Jay
      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
      • 26903
      • 1,336 Posts
      OK, thanks for the feedback

      Just to give some idea of timescales I’m planning to have the base module that allows the auditing system to be installed and managed ready by say next weekend, its not difficult coding but because we are in the DB here I want to be doubly careful about testing.

      I’ve already found for example that in the unlikely event that the main modx database is OK but the history database becomes unaccessible you cant even log into the manager as the trigger that fires to log the login event fails and leaves you with an error dialog. I’ll provide some external auto-generated scripts that you can run from a normal mysql session to turn auditing off for this kind of emergency should it happen. Other than corner cases like this it ’just works’ in the background and looks OK. Also the mysql documentation says that you can trigger to a remote DB if you use the federated storage engine, so in theory you can audit many sites to the same history DB by just changing the table prefixes, this wont be a part of the initial module but could be added later.

      I’m planning to call it ’Auditor’, or possibly ’Auditor-Base’ to allow for other query modules such as ’Auditor-Content’, ’Auditor-Users’ etc which can be added later. Please suggest other names here if you think this is not appropriate, especially if it grows to encompass other usages as suggested above.




        Use MODx, or the cat gets it!
        • 26903
        • 1,336 Posts
        OK guys, version 1.0 is ready, I’ve uploaded it into the resources area, it has its auto generated entry, look for tags auditing, versioning.

        Ive got this on 3 systems now and it looks OK, lets see how it turns out.
          Use MODx, or the cat gets it!
          • 27708 MODX Staff
          • 2,502 Posts
          Here is the link to Auditor for those who come to this thread and want to get there from here. smiley
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 26903
            • 1,336 Posts
            I’ve been racking my brains a bit about how to best present/use the data now in the history database, we cant really do any of this in the Auditor module, this should just really be a control module, so Ive been musing and experimenting with using MODx to do this for us, ie use a seperate MODx installation, tailored where needed to do all the heavy lifting here./

            Rather than splat the thread with details please go here http://bitez.hobby-site.com/index.php?id=83 for my latest ramblings on this.

            Comments welcome
              Use MODx, or the cat gets it!
              • 22770
              • 285 Posts
              Quote from: shamblett at Jun 03, 2008, 08:57 AM

              OK guys, version 1.0 is ready, I’ve uploaded it into the resources area, it has its auto generated entry, look for tags auditing, versioning.

              Ive got this on 3 systems now and it looks OK, lets see how it turns out.

              Very cool. I’ll try this ASAP and see how it goes. Thank you!
                • 22770
                • 285 Posts
                Quote from: foniksonik at May 23, 2008, 10:24 AM

                Thanks for this.... great contribution.

                I plan to have my ModX team create a plugin triggered by events for each manager form, first docForm, then chunkForm and snipForm, which will display the history entries as a dated list with a open/close div to show the actual content for comparison and finally a link to do a quick dom scripting copy/paste of the contents into the textarea.

                For pages we’ll add a new tab, called History and show the list there. There will be some UI work to discover the best way to present this.... but it sounds very doable.

                Anyone else thought about drafts? I’ve always wanted to be able to create a draft of a document that is not published but still have the last version of the document published. I think there should be a new button next to SAVE that says, SAVE DRAFT - and will just add a new entry into History without changing the current published page....

                anyways, lots to think about and get code created for.... thanks again, I’ll post my results when they come in.


                Drafts also would be fantastic. It’s one of the things my users are always asking for, but it’s way beyond my capabilities. Looking forward to what you come up with.
                  • 3638
                  • 21 Posts
                  Looks really great !

                  I’m waiting now for a graphic interface !

                  I hope it would be soon !
                    • 26903
                    • 1,336 Posts
                    Hi, just an update here,

                    I’ve settled on a scheme to do the audit analysis which I’m now implementing, basically you will have an updated Auditor module and a separate analysis tool, based on MODx and installed into the history database. I’ve updated my site project page for this now that its moved away from prototyping and into a more real product.

                    Plaese go http://bitez.hobby-site.com/index.php?id=83 for more details, workflow, rationale, limitations etc.

                    I’m hoping to have this done by say mid July ie in about 2 weeks or thereabouts.
                      Use MODx, or the cat gets it!
                      • 26903
                      • 1,336 Posts
                      OK, I’ve released the MODx Auditor Analysis tool at V1.0 to get the ball rolling here, its in the resources section. To fully recover data you’ll need Auditor version 1.1 which I’m still working on, stay tuned.
                        Use MODx, or the cat gets it!