Problem/Motivation

Steps to reproduce

To reproduce:

1. Config workflow and enable moderation_sidebar module for content type article.
2. Go to the page to a new article node.
3. Enter any required fields, like title
4. Click "Preview" to preview the node

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

tannguyenhn created an issue. See original summary.

tannguyenhn’s picture

StatusFileSize
new442 bytes
tannguyenhn’s picture

Status: Active » Needs review
justcaldwell’s picture

Priority: Normal » Major

Confirming this issue and that the patch corrects it. Thank you!

Also setting to Major, as it does "trigger a PHP error through the user interface" when you attempt to preview new, unsaved node.

The website encountered an unexpected error. Please try again later.

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "entity" for route "moderation_sidebar.sidebar_latest" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 203 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
berdir’s picture

Confirmed that this works, it also makes sense to not add cacheable dependencies because a new entity has no cache tags.

Tests would be useful.

qusai taha’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed this issue and that the patch corrects it

joelpittet’s picture

StatusFileSize
new1.94 KB
new2.38 KB

Here's what I hope is a red/green patch for tests. If so, I'll commit this.

joelpittet’s picture

Status: Reviewed & tested by the community » Needs review
joelpittet’s picture

Status: Needs review » Fixed

Thank you @tannguyenhn and all who tested this patch out, I've committed it to the dev branch for a new release.

  • joelpittet committed 20afd75 on 8.x-1.x
    Issue #3264639 by joelpittet, tannguyenhn, justcaldwell, Berdir, Qusai...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.