Problem/Motivation

When using a hook_preprocess_entity_comparison_link, it is not possible to alter the link because it is already generated.

Steps to reproduce

/**
 * Implements hook_preprocess_HOOK().
 */
function foo_preprocess_entity_comparison_link(&$variables) {
  $link = $variables['output'];
  // Can't do anything with it.
}

Proposed resolution

template_preprocess_entity_comparison_link() should use toRenderable() instead of toString().

CommentFileSizeAuthor
#2 entity_comparison-3197691-2.patch463 bytesprudloff

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
StatusFileSize
new463 bytes

The attached patch uses toRenderable().

lobodakyrylo’s picture

Status: Needs review » Fixed
lobodakyrylo’s picture

Status: Fixed » Closed (fixed)