Fix to limit Entity embed dialog alter from altering all entity types or bundle type

Created on 12 June 2024, 11 months ago
Updated 15 July 2024, 10 months ago

Problem/Motivation

varbase_media_form_entity_embed_dialog_alter hook doesn't check the bundle type

Steps to reproduce

Given that I created a new entity embed button for node (content type)
And add the embed button to a CKEditor 5 text format
When embedding a node
Then number of media entity type-related fields are added to the embed dialogue

Proposed resolution

  • Restrict the logic in the hook_form_entity_embed_dialog_alter() only to the media entity type
  • Remove all media fields for other entity types like ( node, term, or user)

Maybe this fix should be in Drupal core or the Embed Button not to add extra fields which is not for the current used entity type

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0 , varbase_media-10.0.1 , varbase-9.1.4 , varbase_media-9.1.10

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan ahmad abbad Jordan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024