Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDST-747: Fix error on Newspaper Members page #85

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Plugin/Block/DisplayCitationsBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ public function blockSubmit($form, FormStateInterface $form_state) {
* {@inheritdoc}
*/
public function getCacheTags() {
// Retrieve the node ID.
// Retrieve the node parameter.
$node = $this->routeMatch->getParameter('node');
$node_id = $node instanceof NodeInterface ? $node->id() : NULL;

// If it's an object, get the ID. Otherwise, assume it's already the ID.
$node_id = is_object($node) ? $node->id() : $node;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't needed because $node instanceof NodeInterface is already being checked? The module version just needs to be upgraded in the environment


// Return cache tags.
if ($node_id) {
Expand Down
Loading