Data loss if module removed

Created on 15 June 2023, about 1 year ago
Updated 22 September 2023, 9 months ago

Problem/Motivation

I’m working with a distribution-like project that uses Drupal for digital asset management. We want to recommend able player but cannot because:

-it’s still in alpha indicating all features may change and there is no security coverage
- if the module were ever removed from a site, all transcript files would be deleted.

A real release, and/or steps taken to prevent content loss, would make this module useable in our context.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @rosiel
  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    That is great to hear you are considering it for a Drupal distribution. I have been looking at using it as a media player in Archipelago too.

    We have been doing a lot of testing on sites we run hoping to get to a stable release.

    I will need to test the install/uninstall and figure out a plan for making the transcripts stay in place or possibly give users the option to remove them.

    Thank you for the feedback

  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    I tried this on a fresh install and on a local copy that I have had around for a few update cycles, beta 4, 5, 6 and I do see that the media references break on uninstall. They appear in Content -> Media but clicking on them throws an error.

    Error: Call to a member function getSource() on null in Drupal\media\Entity\Media->getSource() (line 137 of /app/core/modules/media/src/Entity/Media.php).
    Error: Call to a member function label() on null in Drupal\media\MediaForm->form() (line 25 of /app/core/modules/media/src/MediaForm.php).

    However, Content -> Files still has the files, and clicking them shows their content.

    Reinstalling the module, makes the media references work again.

    I will have to research further how to keep the media references valid after the module is uninstalled. When that is resolved moving to a stable release seems prudent. If you have any ideas on how to keep the media references valid, I always appreciate contributions, ideas, code, and feedback like this.

    Thank you.

  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    We believe we have a working solution.

    The installed configuration was moved from the config install directory to the config optional directory. This keeps the media references within Drupal happy. The uninstall hook then was deemed not necessary so that has been removed to allow Drupal to manage dependencies.

    We are going to test a few more variations of the module being installed fresh, existing, and uninstall/reinstall but so far this maintains the data integrity.

    The branch issue-3367081 is current with the altered code.

  • Status changed to Needs review 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    This is solved in 3.x.

  • Status changed to Fixed 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States theMusician
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024