Allow to edit media fields for each uploaded item, inline

Created on 5 November 2018, over 6 years ago
Updated 5 April 2023, about 2 years ago

Currently the module allows to insert only a single name. Would be possible to have multiple forms, one for each media?

Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇮🇹Italy finex

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    I think easily adding the alt text is valuable in bulk but I'm not so sure about the other metadata. And, given there is the other module noted in #6, I don't think we need to add this here. Given that the maintainer also didn't think this should be added, I'm closing this. If someone feels strongly about adding this feature and can write the code for it, then we can consider reopening this.

  • 🇧🇪Belgium flyke

    Hi,

    I am one of the persons who would really love to have the option to be redirected to the edit forms for each item after upload is complete.
    So just like the simple_media_bulk_upload module. But I would like to have it build into this module. For me it makes sense to merge the 2 projects.

    I agree that when your uploaded media items are only a bunch of images, and your Media type does not have a lot of fields, there is not much need for this functionality.

    But we are building a digital asset management system for our clients. Our media types all have fields like 'Category', 'Tags', 'Description' etc. I really like the current media bulk upload form where I can set default values, but I am missing the option to adjust values for individual items right after the bulk upload.

    So for me, I would really like to have this reopened.

  • @flyke opened merge request.
  • 🇧🇪Belgium flyke

    I tried to tackle this.

    I'm very sorry to say that this first attempt is NOT inline.
    In our case each Media entity has so many fields that having all of them displayed for all uploaded items on a single page is just too much.
    But if you want a solution to edit each created Media entity after bulk upload, then this works.

    I works like this:
    - Add a new setting 'Edit each Media item after upload'. If checked:
    - After your multi upload has finished, then automatically go to the Media edit page of the first new Media entity that was created by bulk upload
    - The Media edit pages are altered so you can save and go to the next Media edit page
    - Extra button to stop editing has been provided

  • Status changed to Needs review almost 2 years ago
  • 🇧🇪Belgium flyke

    I'm sorry, it appears my local testing was on branch 3.0.x-dev but it seems my merge request originated from 8.x-1.x-dev.
    I botched this and will try to create a new one from 3.0.x-dev. I have it working locally, its just the creating Merge requests that I need to get better at.

  • Status changed to Needs work almost 2 years ago
  • Status changed to Needs review almost 2 years ago
  • 🇧🇪Belgium flyke

    I added a new setting to set the path where to redirect to after you've finished editing all new Media items.
    Updated the screenshot.

  • 🇳🇱Netherlands Johan den Hollander

    The patch applies without any issue. However when I'm done editting I am presented with an error. Not sure if this is a problem with the patch of with my site in general though....

    Log says:

    Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("node") to generate a URL for route "entity.node.canonical". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of /var/www/html/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).

    This was when I had the redirect url after editting set to: /node/3 (this was the default when enabling this functionality. This is the frontpage as set in the Basic Site settings.

    After changing it to: /admin/content/media-grid the there was no issue.

  • 🇧🇪Belgium flyke

    This is now working in the MR of issue #3023825

  • First commit to issue fork.
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Thanks @flyke for the code and @johan den hollander and @cmd87 for reviews/updates.

    Hopefully someone can review and test further and get this to RTBC.

  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    @bkosborne as for simple_media_bulk_upload, it would have been nicer to improve on this module as it's been around longer rather than make a new module that does similar work... but... such is Drupal :D

  • 🇺🇸United States bkosborne New Jersey, USA

    Generally I agree, but my module just lifts out a sub-module from Lightning Media. It was already written I just had to make some minor tweaks. Something we were already using.

  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Ah… fair enough 👍

Production build 0.71.5 2024