Mistake in node type

Created on 2 May 2025, about 1 month ago

Problem/Motivation

The preprocess node seems to check a node type "on_demand_tutorial" which seem wrong and is not defined in the config. I guess it is supposed to be youtube_playlists

/**
 * Implements hook_preprocess_node().
 */
function youtube_playlists_preprocess_node(&$variables) {
  if ($variables['node']->getType() == 'on_demand_tutorial') {
    $youtube_link = $variables['node']->get('field_youtube_url')->uri;
    if (!empty($youtube_link)) {
      // Override the node URL with the youtube_link.
      $variables['url'] = $youtube_link;
    }
  }
}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024