Provide field widget

Created on 9 July 2019, over 5 years ago
Updated 17 January 2024, 10 months ago

It would be nice to merge in the functionality of https://www.drupal.org/project/remote_stream_wrapper_widget β†’ here.

✨ Feature request
Status

Needs review

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

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

Comments & Activities

Not all content is available!

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

  • πŸ‡©πŸ‡ͺGermany VISIOS

    Using the patch #8 for a field widget works for me. Not using query parameter tho.

  • πŸ‡¬πŸ‡§United Kingdom aesuk

    Hi we are in a Drupal migration 7>10 project for many sites and most used this module.

    The remote_stream_wrapper_widget is clearly abandoned. Im as considering media_entity_remote_image but that can't handle our CDN delivered PDF's and other non image files.

    Can that patch be published yet?
    Do we need any more proof it works? I can test it again.

  • πŸ‡ΊπŸ‡¦Ukraine abyss

    @aesuk this issue does not apply specifically to adding a widget.
    I created a separate task for this πŸ“Œ Add a process for creating file name Active .

  • πŸ‡ΊπŸ‡¦Ukraine abyss

    So, there is one problem with this module. At the moment, if we try to save an image from an aspx file, or any other file whose link does not contain the file extension, there is a problem with saving this file and creating image styles for it.
    The only good option for versions higher than 8 is to rework it for Media.
    There is also an option to rewrite the validation for the File module and, accordingly, for ImageStyle.
    @Dave Reid, what do you think about this? Maybe you have other suggestions on how we can solve this now?

  • πŸ‡¬πŸ‡§United Kingdom 2dareis2do

    I am also trying to use remote stream wrapper widget.

    Although it works well when adding via /media/add it does not work so well when adding via a node/xxx/edit page e.g. when using media/entity reference or ckeditor etc.

    https://www.drupal.org/project/remote_stream_wrapper_widget/issues/3408275 ✨ Cannot add remote image from ckeditor 5 media embed button Active

    I have also looked at how other modules handle this and this seems to be handled a little differently. e.g. the media_iframe module seems to cater specifically for a inline_frame bundle and as such can also provide a custom views plugin or ui with bespoke attributes.

    Here, I am a little confused how this works as the way I am using the remote_stream_wrapper as this is not a distinct entity bundle type but a variation on an image asset. i.e. this still uses file_)managed table and I guess the whole ecosystem that comes with it. I am wondering if it is better to use remote_stream_wrapper as a distinct entity_bundle which would lend itself to also working with the media module?

  • πŸ‡¬πŸ‡§United Kingdom 2dareis2do

    I have looked at how media_entity_remote_image handles this. Here they have created a both a bundle and new field e.g.

    dependencies:
      config:
        - core.entity_form_mode.media.media_library
        - field.field.media.remote_image.field_media_remote_image_url
        - media.type.remote_image
      module:
        - media_entity_remote_image

    https://www.drupal.org/project/media_entity_remote_image/issues/3367270 ✨ Add ability to add remote image media on "Add or select media" form Needs work

    And can see that they have created a custom form for this. Also use of hook_form_FORM_ID_alter and hook_media_source_info_alter

    also they are able to define a custom plugin for remote_image media bundle

    e.g. /src/Plugin/media/Source/RemoteImage

    My feeling is the minimum requirement is to have a distinct remote stream wrapper media type bundle that we can apply similar logic.

    There may also be some benefit in having a distinct remote_stream_wrapper field type (similar to field_media_remote_image_url) that is free from some of the constraints of the file_managed table constraints that are used by an uploaded image.

Production build 0.71.5 2024