Problem/Motivation

Since the "Remote video" type doesn't expose the name field, it's not possible to change the name of the media item. That's expected, because oEmbed fetches the media name from the API.

If you change the source field value, the name will not be refreshed. So you stay with an old name that doesn't belong to the video.

Proposed resolution

Use the fieldmapping to map the oEmbed title to the media name property.

CommentFileSizeAuthor
#2 2983325.patch485 byteschr.fritsch

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Status: Active » Needs review
StatusFileSize
new485 bytes

Here is a patch

phenaproxima’s picture

Status: Needs review » Needs work
Issue tags: +Media Initiative, +Needs tests

Looks good to me, but it needs tests. :)

marcoscano’s picture

Category: Task » Bug report
Issue tags: +DevDaysLisbon

(cross-post with Adam)

Thanks @chr.fritsch !

I think this is actually a bug. If the name is not exposed, everything should work out-of-the-box. If you have an existing media item that after changing the URL it doesn't update the name, and you are not able to fill in the new name manually either, something is wrong.

Can we have a fail test as well?

-Edit:
For the record, my statement above is technically incorrect. This only seems to be a problem in queued types, where the metadata is not update during the first save operation.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

seanb’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2882473: Hide the media name basefield from the entity form by default

I think we can close this in favor of #2882473: Hide the media name basefield from the entity form by default. That solves the issue for all media types.