Videos uploaded with CKEditor5 widget do not display

Created on 19 January 2024, 11 months ago
Updated 5 March 2024, 10 months ago

Problem/Motivation

I am trying to embed private videos and display them in nodes using CKEditor5 in Core. (Running version 10.1.6 currently.) But more recent uploads do not display. I tracked the issue down to "include file in display" box showing checked (i.e. yes, display) but internally being set to NULL in the DB. See forum post https://www.drupal.org/forum/support/post-installation/2024-01-17/embedd... โ†’

Steps to reproduce

  1. Add a new Blog Post type node.
  2. Insert a private video using the "Insert media" widget.
  3. Save the node.

On my site, the video does not display. The video is uploaded properly and the embed code looks fine but the video doesn't display. (See the forum post for more details.)

The video's media page at /media/86/edit shows the "include file in display" box is checked but the DB shows the "display" flag as NULL instead of 1 as the older uploads show.

mysql> select * from media__field_media_video_file_1;
+---------------+---------+-----------+-------------+----------+-------+------------------------------------+----------------------------------+--------------------------------------+
| bundle        | deleted | entity_id | revision_id | langcode | delta | field_media_video_file_1_target_id | field_media_video_file_1_display | field_media_video_file_1_description |
+---------------+---------+-----------+-------------+----------+-------+------------------------------------+----------------------------------+--------------------------------------+
| private_video |       0 |        66 |          66 | en       |     0 |                                143 |                                1 |                                      |
| private_video |       0 |        69 |          69 | en       |     0 |                                146 |                                1 |                                      |
| private_video |       0 |        72 |          72 | en       |     0 |                                149 |                                1 |                                      |
| private_video |       0 |        73 |          73 | en       |     0 |                                150 |                                1 |                                      |
| private_video |       0 |        76 |          76 | en       |     0 |                                153 |                                1 |                                      |
| private_video |       0 |        79 |          79 | en       |     0 |                                156 |                             NULL | NULL                                 |
| private_video |       0 |        80 |          80 | en       |     0 |                                157 |                             NULL | NULL                                 |
| private_video |       0 |        82 |          82 | en       |     0 |                                159 |                             NULL | NULL                                 |
+---------------+---------+-----------+-------------+----------+-------+------------------------------------+----------------------------------+--------------------------------------+
8 rows in set (0.01 sec)

So I tried the resolution below.

It's there now.

Proposed resolution

I found that if I go to the specific video's media page at /media/86/edit and first UNcheck the "include file in display" box and save it, then CHECK it again and save it, then the video appears.

This is happening with all my new uploads though. My config is set to display and the "include file in display" checkbox is checked as it should be, but it is misleading b/c it isn't the actual state for my newly uploaded videos. (i.e. they don't display)

Resolution would be to fix the problem of the misleading checkbox. It should really be set to display (1) when the box is checked.

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Mediaย  โ†’

Last updated about 21 hours ago

Created by

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024