Incorrect configuration in youtube_params

Created on 9 June 2025, 4 days ago

Problem/Motivation

In the Manage Display settings for the video field, the Params parameter defaults to the value "Play," which is not a valid parameter accepted by YouTube. When this value is modified and saved, the change does not take effect, and the parameter continues to display as "Play."

Steps to reproduce

  1. Navigate to the Manage Display settings for a content type that includes a video field.
  2. Locate the video field in the display configuration.Click to edit the settings for the video field.
  3. Check the value of the Params parameter, which defaults to "Play."
  4. Modify the Params value to a valid parameter accepted by YouTube (e.g., "autoplay=1").
  5. Save the changes.
  6. Return to the Manage Display settings and observe that the Params value still displays "Play" instead of the updated value.
  7. Verify that the video does not apply the intended parameter changes during playback.

Proposed resolution

'#default_value' => $this->getSetting('youtube_video_play'),

<strong>

It should be:

'#default_value' => $this->getSetting('youtube_params'),

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΎUruguay apereira23

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

Merge Requests

Comments & Activities

  • Issue created by @apereira23
  • πŸ‡ΊπŸ‡ΎUruguay ruby232 Montevideo
  • First commit to issue fork.
  • πŸ‡¨πŸ‡ΊCuba pponcedeleona

    Issue Summary

    After the recent changes, the youtube_params field is now saving correctly in the formatter configuration, but these parameters are not being applied to the YouTube videos when rendered. Additionally, there should be a tooltip or help text indicating which parameters are valid, as some common parameters like autoplay are not supported due to the nature of the lite-youtube library.

    Steps to Reproduce

    Go to Structure > Content types > [Content Type] > Manage display

    1. Configure a field using the "Lite YouTube" formatter
    2. Set YouTube parameters in the "Params" field (e.g., start=30s&controls=0)
    3. Save the configuration
    4. View content with YouTube videos
    5. Observe that the configured parameters are not applied to the YouTube embed

    Expected Behavior

    1. YouTube parameters configured in the formatter settings should be applied when the video loads
    2. The configuration form should include help text or tooltip indicating which parameters are supported by the lite-youtube component

    Actual Behavior

    1. The recent changes successfully allow the youtube_params field to save correctly in the configuration
    2. However, these saved parameters are not being applied to the video when it renders
    3. No guidance is provided about which parameters are valid (e.g., autoplay is not supported by lite-youtube)
  • πŸ‡¨πŸ‡ΊCuba jleon1110

    I tested the recent changes. The youtube_params field is saving correctly in the formatter settings, but the parameters are not working when the video shows on the page. I tried values like start=30&controls=0, but they don’t change the video. It looks like the parameters are not added to the <lite-youtube> tag.

    Also, there is no help text to tell users which parameters are supported. For example, autoplay does not work because the lite-youtube component does not support it.

    I will fix two things:

    Make sure the saved youtube_params are added to the video embed.

    Add help text in the settings form with a link to the lite-youtube documentation, so users know what parameters they can use.

    I will share a patch or merge request soon.

Production build 0.71.5 2024