My situation is almost exactly the same as described by this thread/comment by author, but it kind of died and there was no resolution: http://groups.drupal.org/node/786#comment-24587
I have what seems to be a straight-forward problem, but I've been reading everything I can and tearing my hair out without finding a solution. We're in the process of moving a corporate website to Drupal and need to figure out a publishing process. In retrospect, perhaps we should have used a different system, but the developers we've been working with assured us this wouldn't be a problem, and now they can't figure it out.
Here's the situation:
We have 2 servers.
* Stage - behind the corporate firewall. This is where code changes are tested and content is added, updated, and developed.
* Production (live) - out on the internet. This should only have the latest versions of approved content and no one will ever log into this installation to change content.
The main sticking point is support for any type of editorial process. Content that is added or changed may not be immediately suitable to be published live to the Production server. The content may need further editing and development, or it may need to go through an internal approval process.
Version Control Analogy
A good analogy would be that the Production server tracks the HEAD revision of a subversion/cvs repository. Stage is a working copy where we make lots of changes and when we get the changes we like, we commit them and those changes (and only those changes) reflect on the Production server.
Things I've been suggested that won't work and why:
* Syncing or dump/restore the whole database
I wish this worked because it's so easy to do and integrate/automate with subversion. The issue is that "newest" version in Stage may not be appropriate to have viewable on "Production". Likewise, if the state of content is changed (standard published/unpublished, or workflow module states) those would be reflected on the live site and either the wrong content would be displayed or content would "go missing."
For instance, there is a live "About" page on the Production server that has been approved, but we decide we want to update it. If I edit the page on Stage, I may not finish before I have to save, or I may write something which needs to be approved by upper management. In this case, there are written changes that should not be pushed. If they are, it would be disasterous.
* Editing Content on the Production (live) server
For the same content-control reasons as above. We need to be able to have a live version and a working version which are separate.
* Auto-Pilot Module (I think...)
http://drupal.org/project/autopilot
I've talked to the developers, and aside from really being a code/config tool rather than a content tool, it only works on 5.x and I'm using 6.x. They could custom adapt it for me, but that probably wouldn't solve my problem anyway.
Promising?
* Workflow Module
My thought is that maybe I could use workflow to trigger database export/import action. For instance, when a node goes from "Work in Progress" to "Approved" it would export the node from the Stage server and and trigger an import in the Production server.
I'm not sure if I can trigger those types of actions though.
Please help, I'm at the end of my rope here.
Thanks!
Comments
_
I've been looking at this problem too-- I'm sort of at the opinion that the 'workflow' option is probably the way i'm going to go. For d6, you'll want to look at the http://drupal.org/project/rules module which allows for php code to executed upon certain conditions. I haven't gotten very far, but I'm thinking of putting a shared cck field on all nodes for 'production/development' and writing a custom php script to take any nodes marked 'production' on the development site and push them to the production site.
Another option I've been tossing around is to make a new module based on the http://drupal.org/project/scheduler module that publishes to a different site.
I'd probably try to use http://drupal.org/project/issues/importexportapi or yank some code from it.
These approaches assume only content movement and that the sites themselves are already identical setting and config wise.
Unfortunately, I haven't gotten very far with it yet.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Thanks, I hadn't come
Thanks, I hadn't come across "rules" or "scheduler" in my research yet. Let me know if you make any progress, and I'll do the same. When it gets figured out we should make a module or a how to.
What's your timeline/urgency to figure this out? Maybe it would make sense to work together?
_
I have no urgency at all-- it's just something i have on the todo list for some point in the future. Currently our workflow is setup up to use unpublished nodes by default, and have the editors/approvers simply publish them when ready. But I'd be more than happy to help out and/or collaborate if possible.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
I thought of something
I thought of something similar, but the issue becomes editing content that has already been published...For instance, if I start editing a page that is already published by unpublishing it, if the site gets synced for some other reason, that content gets unpublished on the live site.
Have you figured out any of the rules or php code you need to publish specific items? If you could share that would be amazing.
My deadline is unfortunately at the end of this coming week, some of my contractors have left me in a bind, so I'll have to figure this out one way or another.
By the way, I forgot to mention in the last comment, that yes, I am only concerned about content as config can be more easily handled separately.
Thanks so much for responding.
_
Believe it or not, i'm currently not using any custom code-- the site is still d5 (i'm working on the d6 version) and I use revision_moderation to handle the updating of already published content. I use workflow_ng and actions/triggers to send out simple notifications when items get created and/or updated. And i used views to add a tab to the editors/approvers 'my account' page to display the content they need to review and/or approve. Very basic functionality but it seems to work ok.
sorry to hear you're in a bind with such a tight deadline-- thats one of the reasons i'm doing this stuff myself instead of hiring contractors. =/
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
_
That actually sounds like a great way to do it. I'veYou may have just saved the day!
I'd never heard of the revisions module.
This is the con of subcontractors...I know a lot, but I'm learning about this. Most of my CMS experience is with Wordpress which the clients nixed because of multi-host issues (they'd used it and hated it.)
_
I've been testing revision_moderate and it's PERFECT! Thank you so much!
_
Excellent! Happy to help ;-)
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Is this it?
Is this the module you guys are referring to?
http://drupal.org/project/revision_moderation
WorldFallz, sounds like you've got a good system going and it would be nice to get more details on all the moudles and workflow.
Thanks,
Mark
_
There's not much more to add to my comment above. The modules I used are revision_moderation, workflow_ng, and views. Enable revision moderation on the appropriate content types, setup a workflow_ng rule to email the editor role upon content update, and use views to place a tab of pending revisions on the user's account page for the editor role. You could also just place the included 'pending visions' block on the account page for editors.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.