unlcms / project-herbie

Drupal 10 implementation at the University of Nebraska–Lincoln
https://cms.unl.edu
GNU General Public License v2.0
5 stars 6 forks source link

Replace Entity Embed with core Media Embed #182

Closed macburgee1 closed 4 years ago

macburgee1 commented 4 years ago

Drupal 8.8 ships with tools that allow us to replace our current Entity Embed/Entity Browser solution with a core solutions.

This issue is blocked by #165

macburgee1 commented 4 years ago

Until 8.8.2 lands, we'll need to patch core per "Convert line breaks into HTML" filter should exclude tag.

macburgee1 commented 4 years ago

Blocked by #184

macburgee1 commented 4 years ago

Here's what currently blocking this issue/PR:

macburgee1 commented 4 years ago

The core issue is unlikely to be resolved anytime, so I updated the Media Embed View Mode Restrictions module to incorporate the necessary fixes. This issue has been rescoped to deploy the Media Embed View Mode Restrictions module, which is part of the Media Library Extras project.

macburgee1 commented 4 years ago

Should be tested with unlcms/unl_five/pull/20

ericras commented 4 years ago

config-import errors out trying to upgrade an existing site that's on master.

So this occurs during the entity_embed uninstallation. Unchecking "Display embedded entities" on /admin/config/content/formats/manage/standard/ before running the import avoids the error

GUI:

Drupal\Core\Extension\ModuleUninstallValidatorException: The following reasons prevent the modules from being uninstalled: Provides a filter plugin that is in use in the following filter formats: <em class="placeholder">Standard</em> in Drupal\Core\Extension\ModuleInstaller->uninstall() (line 393 of /Library/WebServer/Documents/workspace/project-herbie/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php).

Drush:

[notice] Synchronized extensions: install media_embed_view_mode_restrictions.
 [notice] Synchronized extensions: uninstall media_entity_browser.

In ModuleInstaller.php line 393:

  The following reasons prevent the modules from being uninstalled: Provides a filter plugin that is in use in the following filter formats: <em class="placeholder">Standard</e  
  m>                                                                                                                                                                              
ericras commented 4 years ago

Am I right that the fundamental issue is that 'entity_embed' isn't cleaning up after itself during its uninstallation?

In any event, this isn't a big deal right now in our present project state. In the future with a mass number of sites we would need to choose what to do; either fix the module or just deal with it and mass change the setting first across all the multisites

macburgee1 commented 4 years ago

Short version: If you start from a new Drupal install, it should work fine.

Long version: Because we don't have any production sites on this project, I haven't been testing upgrade paths on PR branches.

In this instance, a module was removed, and it happened in a single step. From the perspective of your existing site, the Entity Embed module simply disappeared from the codebase; thus, it couldn't uninstall itself.

If we had sites in production, this would be a two-step process (i.e. successive releases): 1) uninstall module in Drupal and commit any config changes; however, the module remains in the codebase so it can run its uninstall code and 2) with the module uninstalled, remove the module files with Composer.

macburgee1 commented 4 years ago

Follow-up issue for tracking <drupal-media> in Entity Usage: #192

macburgee1 commented 4 years ago

Fixed remote video preview issue. Follow-up issue for MediaEmbed edit button: #194