Problem/Motivation

Noticed that when you create a new media item it uses the node-edit-form template with the right sidebar. But when you edit the same media item it doesn't

Steps to reproduce

1. Create a media item
2. Verify using right sidebar region
3. Edit media item
4. Right sidebar is not present

Proposed resolution

Consistently using right sidebar.

Remaining tasks

Implement
Review

User interface changes

TODO

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
#5 edit-media.png60.71 KBsmustgrave
#5 new-media.png57.1 KBsmustgrave

Issue fork gin-3496235

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smustgrave created an issue. See original summary.

saschaeggi’s picture

Status: Active » Closed (cannot reproduce)

We're not using the sidebar only for the media entity creation, so this must be some custom config or patch.

To clarify this: Media is using the sidebar but I can't reproduce that the sidebar would be missing.

smustgrave’s picture

Category: Bug report » Feature request
Status: Closed (cannot reproduce) » Active

Then can we :)

saschaeggi’s picture

Status: Active » Postponed (maintainer needs more info)

I still can't reproduce this, we'd need more steps or a video how to reproduce this

smustgrave’s picture

StatusFileSize
new57.1 KB
new60.71 KB

Currently this is what we see when creating new media

new

But when we edit

edit

jurgenhaas’s picture

It looks like there is a custom module in play. Out of core, there is no "View" tab for media, there is only "Edit" and that's the canonical route for media. If there is a module altering the routes so that there is one for viewing and one for editing, then the route name will be different and Gin can not recognize that route as a content entity form any longer.

Is that possible and if so, which module are you using for that?

smustgrave’s picture

Just the core media library setting.

jurgenhaas’s picture

I'm not sure that's the case. I've tested in a fresh Drupal 11.1 installation and there is no view-tab on media entities.

jurgenhaas’s picture

Is this something from the devel module? I see that this is enabled as well.

jurgenhaas’s picture

Assigned: Unassigned » jurgenhaas
Category: Feature request » Bug report
Status: Postponed (maintainer needs more info) » Active

Found it, there is a setting in /admin/config/media/media-settings which allows enabling canonical pages for media. And that indeed changes the routing name for media entities.

That's easy to fix, but I find that behaviour from core really strange.

jurgenhaas’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

  • jurgenhaas committed 6fbf882b on 4.0.x
    Issue #3496235 by smustgrave, jurgenhaas, saschaeggi: Media edit form...
saschaeggi’s picture

Status: Reviewed & tested by the community » Fixed

Thanks both 👏

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.