19

Workbench gives you an intuitive and friendly user interface to control content (nodes)transitions on a previously defined states on a role based access control means that every transition to the node from a state to a state for the role authorized to perform that transition, with the ability to create new transitions and states. You won't get that feature ...


13

Here are some links to some articles which might be helpful. I've been compiling them myself, to help figure out how to tackle the same issue you're having. Exploring Deployment Methods http://torylawson.com/index.php?title=Moving_Drupal_7_site_to_a_new_server How to migrate from test environment to production environment? Creating a Drupal development ...


10

A great example could be found in Content Moderation module's code. $entity->set('moderation_state', $new_state); if ($entity instanceof RevisionLogInterface) { $entity->setRevisionLogMessage($form_state->getValue('revision_log')); $entity->setRevisionUserId($this->currentUser()->id()); } $entity->save();


9

You could do something like this: /** * Implements hook_menu_alter */ function MY_MODULE_menu_alter(&$items){ $items['node/%node/edit']['access callback'] = 'MY_MODULE_check_node_access'; } /** * Custom menu access callback for node/%node/edit */ function MY_MODULE_check_node_access($op, $node){ global $user; // Note $op and $node are passed ...


9

Implementing this workflow is possible by using a combination of these modules (and regular content types, no need for something like "webforms"): Rules. Node Convert. Flag. Content Access. Refer to my answer in the question about "How can I allow anonymous visitors to submit content?" for examples (and more details) about how to use these 4 modules ...


8

Workbench is the module for Drupal 7. It's easier to use and more intuitive, but from my latest experience revisioning support (ref) is still a feature request. Workflow is older and has more features, including revisioning support, but is more cumbersome to use.


7

You could also hook on hook_node_presave() and check here the value of the field... No ? mymodule_node_presave($node) { if($node->yourfield[.....]['value'] == 'London') { $node->state = '0'; } }


7

Did you test first to see if the "Entity has field" before doing the "Data comparison"? When comparing fields it is necessary to first check that the entity has the field for Rules to pick them up. When comparing basic node attributes like Content Type you can omit this step. Here's an example...


6

While .gitignore, .htaccess and robots.txt will come as part of the package when you clone Drupal, they should not be considered part of core and you should not feel that they cannot be changed or replaced with your own files. This is what I do: Prior to updating (drush up), I make a backup of those three files. After updating, I use the CLI program diff ...


6

So that means it will become the active revision shown to users. So if a revision is published its got to become the default revision as it will be shown as the page content for normal users When you select "Archived" for a piece of content you'd want that to become the default revision too so that when users look at the page they'd see access denied. But ...


5

First, install the Rules module. I would highly recommend watching the Rules video series at NodeOne by the incredibly talented Johan Falk. With the Workflow module and the Rules module installed and configured we can create a rule that automatically publishes (or unpublished) content based on it's current workflow state. To ensure our content is not ...


5

You need to make transitions for the backward states through moderation (eg, Published -> Needs Review, and Published -> Draft) on admin/config/workbench/moderation/transitions Then, on on admin/people/permissions#module-workbench_moderation, assign the permissions appropriately to the roles you want to allow to push things backwards


5

Have you enabled the "Workflow Views" module (in the workflow 'module')? With it you get a example "workflow summary" view with a list of all content with its current state, title and type of the content. In views you get access to a few new fields like "current state", "previous state", ...


5

We use the Workflow module and have found it to be pretty stable, and we use it exactly as you have described, to allow a content person to edit content, then for an admin to approve it. Configuring the workflow module is a bit complicated, but it is worth doing as it will provide you the functionality you need. Generally it has the following steps: ...


4

I would approach this by adding the Logintoboggan module, which integrates with Rules via a submodule. Logintoboggan will allow you to assign users a special role before their account is verified. Normally, this verification is performed by the users themselves via e-mail, but you could stop that e-mail from being sent and instead have the admin do the ...


4

I think you're looking for the Workbench Moderation module. From the project page: Workbench Moderation adds arbitrary moderation states to Drupal core's "unpublished" and "published" node states, and affects the behavior of node revisions when nodes are published. Moderation states are tracked per-revision; rather than moderating nodes, Workbench ...


4

I use a global gitignore file https://www.drupal.org/node/1054616#comment-4139810 Place the following in ~/.gitignore: *~ *.orig *.rej *.patch *.diff LICENSE.txt .directory Then run this: git config --global core.excludesfile ~/.gitignore To add a file that is in the ignore list (like a .patch file) do this git add --force awesome-sauce.patch Side ...


4

Workbench is a great way to do this if you are OK with installing another module. Workbench allows you to add moderation states. By default it gives you 'draft', 'published', and 'needs review'. (Drupal 8 also has "archived"). There is also a set of transitions that go with these states (ie, draft -> needs review) For the three roles you described above, I ...


3

You can use the Views UI: Edit Basic Settings module: "Views UI: Edit Basic Settings" places edit tabs on Views pages, similar to node pages, and allows users with the correct permission to modify their header, footer, title, empty text, or number of items to display. This module also provides a separate interface that displays a list of views. All Views ...


3

That's a very broad question so I can only really give a very broad answer. There are two options that I know of for this type of workflow: The aptly named Workflow module The workflow module allows the creation and assignment of arbitrary workflows to Drupal node types. Workflows are made up of workflow states. For example, a workflow with the states ...


3

I use workbench, which accomplishes the same thing as workflow. There is a module in the workbench collection called Workbench access that I use to send content to specific editors in the workflow. I use it for my school newspaper so that writers moderate content to the editors of their specific section (i.e. news, sports, arts, lifestyle, etc.) then the ...


3

There is no single hook that allows you to control who can see or edit a node in a specific workflow state. You might want to implement hook_node_access_records() to give out grants for a specific node and hook_node_grants() to check whether a specific user has that grant. The result of your hook_node_access_records() implementation is stored in the ...


3

I think I figured this out, actually. Create a new View which lists "Content revisions" (not just "Content"). "Save & continue." On the View edit screen, open up the "Advanced" right-hand column, remove the "Content revision: Content" relationship from the "Relationships." This causes the View to query the node_revision table, but join the node table in ...


3

Workbench uses Views to render it's data. The trick - whilst new user is now considered author of a node, last edit was not his. So it will not be seen in "my edits". Go to http://example.com/admin/structure/views/view/workbench_edited/edit. You will see: This filters by revision's author. Not what you want. What you need is to filter by node's user. But ...


3

Sounds like you might want the flag module. You can create a "Famous" flag, where certain roles can flag items and administrators can remove the flag. It allows you to set the text for flagging and unflagging, so you can have "Make This Famous" or whatever you like. The only part I'm not sure about off the top of my head is showing who flagged the content ...


3

The modules chrischarlton suggested were fine, but those are unsupported and not maintained. I recommend using the Boostrap tour module. With this module, you can show popups step-by-step, attach the popups to HTML elements in each step, save the progress of the user, and let the user add feedback to the tour. However, you need to have a boostrap based ...


3

You can also try the Revisioning module which describes itself: ... for the configuration of workflows to create, moderate and publish content revisions. You use it in scenario's like this: Authors write content that prior to being made publicly visible must be reviewed (and possibly edited) by moderators. Once the moderators have published the ...


3

Option 1: Revisioning A possible alternative could be the Revisioning module. Some more details (from its project page): ... a module for the configuration of workflows to create, moderate and publish content revisions. For the majority of use-cases configuration is straight-forward. The tricky bit are the permissions. To get you up and running ...


3

I did exactly the same but we were wrong in the usage of #limit_validation_errors. The reason why this is failing is that we're not using properly #limit_validation_errors. This issue has nothing to do with Workflow. During the form validation, if this property is set (validation errors are limited), Drupal core will remove any non validated form values ...


3

I have tested with hook_entity_presave() and setPublished(0) and setPublished(FALSE) both worked. So the issue is somewhere else. If you have workbench moderation installed, you may need to set it to one of your moderation states that set it to unpublished. See admin/structure/workbench-moderation/states $entity->set('moderation_state', 'draft'); or ...


Only top voted, non community-wiki answers of a minimum length are eligible