We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered Draft resources

    • 3749
    • 24,544 Posts
    I haven't looked at StageCoach for quite a while, but you should never set the Staged Resource ID value (or any ID).

    On the TV tab of the original resource, just set the date and time in the "Stage Date" TV and save the Resource. The date needs to be in the future, because the plugin will only operate when there's a new visit to the front end and the date has passed.

    If your updates involve TV values (for other TVs, not the StageCoach TVs), be sure to set the stagecoach_include_tvs System Setting to Yes

    Also, AFAIK, there can only be one update page for each live resource, so StageCoach might not work for you if you want to stage multiple updates.
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 51020
      • 670 Posts
      Ah ok. I thought the idea was that if you entered an id then it would update That resource with the content, rather than updating itself.

      I will have another play with it and see if it fits the bill.

      Out of interest, what is the reason for the tv if it's not to be used?
      Thanks
      Andy
        • 3749
        • 24,544 Posts
        The Staged Resource ID TV is set automatically by StageCoach when you save the resource (and it creates the staged resource also at that point).

        You might want to re-read this: http://bobsguides.com/stagecoach-tutorial.html, especially this part:

        To stage a Resource for later update, edit the Resource in the Manager, and on the "Template Variables" tab, select the "Stagecoach" section. Set the date and time in the "Stage Date" TV and save the Resource. Do *not* set the "Staged Resource ID" TV. It will be set automatically by StageCoach. Once StageCoach is working, you may want to create a Form Customization rule that hides the Staged Resource TV since there is no need to edit it manually.

        When a Resource is saved with the Stage Date TV set, StageCoach will make a copy of it in the "Staged Resources" Folder. The update date will be appended to the pagetitle. This is the staged Resource. You can edit it as many times as you like before the Stage Date. When the original page is first visited after the Stage Date, StageCoach will updated it from the staged Resource and delete the staged Resource.

        On second thought, I think it might be possible to create multiple updates for a single resource. Each time you save the resource with the Stage Date TV set, it should create a new staged resource that will be used to update the original on that date.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 51020
          • 670 Posts
          Quote from: BobRay at Feb 28, 2017, 10:41 PM
          The Staged Resource ID TV is set automatically by StageCoach when you save the resource (and it creates the staged resource also at that point).

          You might want to re-read this: http://bobsguides.com/stagecoach-tutorial.html, especially this part:

          To stage a Resource for later update, edit the Resource in the Manager, and on the "Template Variables" tab, select the "Stagecoach" section. Set the date and time in the "Stage Date" TV and save the Resource. Do *not* set the "Staged Resource ID" TV. It will be set automatically by StageCoach. Once StageCoach is working, you may want to create a Form Customization rule that hides the Staged Resource TV since there is no need to edit it manually.

          When a Resource is saved with the Stage Date TV set, StageCoach will make a copy of it in the "Staged Resources" Folder. The update date will be appended to the pagetitle. This is the staged Resource. You can edit it as many times as you like before the Stage Date. When the original page is first visited after the Stage Date, StageCoach will updated it from the staged Resource and delete the staged Resource.

          On second thought, I think it might be possible to create multiple updates for a single resource. Each time you save the resource with the Stage Date TV set, it should create a new staged resource that will be used to update the original on that date.

          Hi there Bob,

          Thanks for the advice so far. I misread the tutorial first time round, but it make perfect sense now.
          But - for some reason, it's putting my changes live right away.
          I have a date set one year in the future - and a copy of the updated resource is saved in my staged resources folder - but the changes have also overwritten the home page.

          Is it possible it's not compatible with the latest version of Modx?

          I think this would be a great solution if we can get it working!

          Thanks
          Andy


            • 51020
            • 670 Posts
            Quote from: BobRay at Feb 28, 2017, 10:41 PM
            The Staged Resource ID TV is set automatically by StageCoach when you save the resource (and it creates the staged resource also at that point).

            You might want to re-read this: http://bobsguides.com/stagecoach-tutorial.html, especially this part:

            To stage a Resource for later update, edit the Resource in the Manager, and on the "Template Variables" tab, select the "Stagecoach" section. Set the date and time in the "Stage Date" TV and save the Resource. Do *not* set the "Staged Resource ID" TV. It will be set automatically by StageCoach. Once StageCoach is working, you may want to create a Form Customization rule that hides the Staged Resource TV since there is no need to edit it manually.

            When a Resource is saved with the Stage Date TV set, StageCoach will make a copy of it in the "Staged Resources" Folder. The update date will be appended to the pagetitle. This is the staged Resource. You can edit it as many times as you like before the Stage Date. When the original page is first visited after the Stage Date, StageCoach will updated it from the staged Resource and delete the staged Resource.

            On second thought, I think it might be possible to create multiple updates for a single resource. Each time you save the resource with the Stage Date TV set, it should create a new staged resource that will be used to update the original on that date.

            Ah - Lightbulb moment!!
            I have a feeling I'm supposed to create the staged resource first and THEN make my changes to THAT resource, rather than the original - is that correct?

            I was making changes first, and THEN saving the staged resource.

            So - if that's the case - that will work - but is there a way I can bring the stage date forward once it's approved? The reason being is that I'm setting a date one year in the future (so it doesn't go live before the client approves it). So once it's approved, i want to push the changes live. The TVs for stagecoach are empty, and there's no publish date set - so the only place I can see the stage date is in the pagetitle - which I assume is there just for reference?
              • 51020
              • 670 Posts
              Quote from: tm2000 at Mar 01, 2017, 09:03 AM
              Quote from: BobRay at Feb 28, 2017, 10:41 PM
              The Staged Resource ID TV is set automatically by StageCoach when you save the resource (and it creates the staged resource also at that point).

              Ah - Lightbulb moment!!
              I have a feeling I'm supposed to create the staged resource first and THEN make my changes to THAT resource, rather than the original - is that correct?

              I was making changes first, and THEN saving the staged resource.

              So - if that's the case - that will work - but is there a way I can bring the stage date forward once it's approved? The reason being is that I'm setting a date one year in the future (so it doesn't go live before the client approves it). So once it's approved, i want to push the changes live. The TVs for stagecoach are empty, and there's no publish date set - so the only place I can see the stage date is in the pagetitle - which I assume is there just for reference?

              OK - so I think I've cracked it with a bit of trial and error - but might help other users in a similar quandary - I have just been into the ORIGINAL LIVE resource, and set a new staged date in the stagecoach TV. I have left the Staged ID as is (which is the ID of the staged resource) and when I hit save, the stage date on that resource is updated. and it works!!
              Sorry for all the toing an froing - I got the wrong end of the stick on how it works - but I got there in the end (with your help Bob!)

              Thanks!
              Andy
              • discuss.answer
                • 3749
                • 24,544 Posts
                I'm glad you got it sorted.

                About your question -- this is from the docs, which I encourage you to read wink :

                If you decide to change the Stage Date, just edit the Stage Date TV of the original Resource. StageCoach will rename the staged Resource to reflect the new date.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 39210
                  • 4 Posts
                  There might be an issue with StageCoach and collections. Tried to set a staged document within a collection. The document will be created (as a copy) but is hidden in the document tree. It can be found via search function by its id. But it doesn't appear in the Staged Resources folder and it doesn't change the original document at the defined time. Nothing happens.
                  With documents directly visible in the tree StageCoach works correctly but not with collection items.
                  What can I do?

                  Using MODX Revo 2.6.5-pl at provider one.com with PHP 7.2.14, MySQL 10.1.30-MariaDB-1~xenial

                  EDIT: tried at other provider (Hosteurope), same result. Simple documents are changing to staged content but collection items don't. [ed. note: rasc52 last edited this post 5 years, 2 months ago.]
                    • 3749
                    • 24,544 Posts
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting