Hi,

I noticed an error when viewing content revisions.

Steps to reproduce:

- Create a piece of content
- Edit and re-save content
- On the content click the 'Revisions' tab
- Click the link for the original revision
- See the following erorr:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function bundle() on string in zen_theme_suggestions_page_alter() (line 47 of themes/zen/zen.theme).

What should happen:
- The user should see the original revision of the content

Cheers

Tom

CommentFileSizeAuthor
#3 zen_revisioning_bundle-2924892-3.patch635 bytesjds1

Issue fork zen-2924892

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blacklabel_tom created an issue. See original summary.

blacklabel_tom’s picture

Hi,

As a follow up it looks like:

/**
 * Implements hook_theme_suggestions_HOOK_alter().
 */
function zen_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  // If on an individual node page, add the node type to theme suggestions.
  if ($node = \Drupal::routeMatch()->getParameter('node')) {

Is returning the node id rather than the node object as it is expecting.

Cheers

Tom

jds1’s picture

Here is a patch that a former colleague of mine wrote and I amended a bit. Should get your revisions working fine.

blacklabel_tom’s picture

Status: Active » Reviewed & tested by the community

Works a treat.

Cheers

Tom

JohnAlbin’s picture

Version: 8.x-7.0-alpha14 » 8.x-7.x-dev
kevans91’s picture

Still hitting this, and the attached patch works fine on our installation as well.

Alok Verma made their first commit to this issue’s fork.