Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As in issue #1238344: Allow other modules to generate images for devel_generate it should be possible to add media files/images to the "file.devel_generate" as well.
I use the same idea with setting a variable, but in this case only if the file widget is "media".
Comment | File | Size | Author |
---|---|---|---|
#1 | 1589056-allow_external_media_files.patch | 1.07 KB | bobodrone |
Comments
Comment #1
bobodrone CreditAttribution: bobodrone commentedHere is the patch!
Comment #2
rerooting CreditAttribution: rerooting commentedFYI this patch does not seem to work with the new media 2.x 'media asset' field.
Comment #3
bobodrone CreditAttribution: bobodrone commentedHei rerooting,
True, this patch is only for the File field (supported by devel generate) and when using the "media widget" for the File field to make it possible to use the devel generate with a custom media/image source rather than using the devel generate source for images.
To use it with the "media field" we might add support for that field in devel generate first in some way and then do the same kind of variable.I just noticed that there is a work going on for this at http://drupal.org/node/1198820. Will look into it L8!Thanx for pointing this out!
/ Bobodrone
Comment #4
bobodrone CreditAttribution: bobodrone commentedThere is now a working patch for media fields as well, to be found here: http://drupal.org/files/1198820-mediafield-devel-generate4.patch . For the history read this issue: http://drupal.org/node/1198820#comment-6208072
Comment #5
rerooting CreditAttribution: rerooting commentedThanks for the help, I found that thread shortly after I posted #2 and am helping them test it!
Comment #6
rerooting CreditAttribution: rerooting commentedUpdate: That patch has been tested and works great. It looks like it'll end up in Media 2.x shortly. Celebrate! Less you guys have to worry about ;)
Comment #7
salvisI'm not sure how to interpret this. Are you saying that this issue is obsolete now because the functionality has been implemented in Media module?
See also #1748302: Lets generate kick-ass demo content!!!
Comment #8
rerooting CreditAttribution: rerooting commentedI was just cross-referencing an update regarding the patch mentioned above.
Comment #9
rerooting CreditAttribution: rerooting commentedTo clarify, this patch: http://drupal.org/node/1198820#comment-6208100 works fine, though it has not been committed (I don't think).
Comment #10
timbrandin CreditAttribution: timbrandin commentedThis can be solved if we take a look at this:
https://drupal.org/node/2011776
In combination with:
https://drupal.org/node/1198820
Comment #11
discipolo CreditAttribution: discipolo commentedComment #12
discipolo CreditAttribution: discipolo commentedthis patch https://www.drupal.org/node/1589056#comment-6013772 would allow the media module to provide its own devel_generate implementation.
so instead of adding devel_generate functionality for filefields with media widget in devel module (https://www.drupal.org/node/2011776#comment-7505037) this could be done in the media module directly (like https://www.drupal.org/node/1198820 but for filefields instead of media fields)
Comment #13
willzyx CreditAttribution: willzyx commentedClosing for lack of activity. Feel free to reopen if the issue still exists