Workbench Moderation - Needs Review?

Hey Folks,

Can anyone provide some insights into what happened to the Needs Review tab in D8 that used to be part of Workbench Moderation in D7? This is a really core function for this module in terms of how all of our clients use Workbench Moderation. I tried creating a custom view, however, when you filter on moderation state the only states that return are "published".

Does anyone have insights or work arounds?

create a view of image files in D8

I was reviewing the Files Overview view in D8, and saw that it gave me all of the image files on the site. Is there a way to view just the images in the view ? The title field provides a link to display the image, but I would like the view to return the images.

Lost "Save and keep published"

I've just upgraded my site from the lightning build 1.14 to 2.06 and in the process, I've lost "Save and keep published" from the content types to simply "Save". By allowing moderation on the content type, I get a "Moderation state" dropdown with different states in, but that appears half way up the page and I can't move it down as it doesn't appear in the the "manage form display" form.

D8 Populate og group & reference filed through form alter

use Drupal\node\Entity\Node;
use Drupal\Core\Form\FormStateInterface;

D8 form alter to auto populate a default value for og audience

use Drupal\node\Entity\Node;
use Drupal\Core\Form\FormStateInterface;

* Implements hook_form_alter() on behalf of tm_sketch.module.
function YOUR-MODULE-NAEM_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form_id == 'your form id') {
$nid = \Drupal::request()->query->get('nid');
$node = is_numeric($nid) ? Node::load($nid) : NULL;
$form['og_audience']['widget'][0]['target_id']['#default_value'] = $node;

D8 embed a view in template

// Render a template file
$twig = \Drupal::service('twig');
$view_content = views_embed_view('your view name', 'block_1');
$template = $twig->loadTemplate('/templates/your_block.html.twig');
$build['your_block']['#markup'] = $template->render(['view_content' => $view_content]);
return $build;

in your twig template u can embed view as follow

{{ view_content }}


Subscribe with RSS Subscribe to RSS - Drupal 8.x