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.
It would be greate to have support for Devel generate.
Devel generate bulk generates nodes- greate for testing.
It doesn't seem to create image nodes properly at the moment.
Comment | File | Size | Author |
---|---|---|---|
#10 | 570834.10.image_.devel-generate.patch | 4.84 KB | joachim |
#5 | image_generate.zip | 1.84 KB | awolfey |
#4 | image_generate.zip | 1.37 KB | awolfey |
#3 | image_generate.zip | 1.89 KB | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedI'll certainly commit a patch for this feature but I don't have the time to look into it myself.
In the meantime, you can always do what I saw David do at the sprint -- use image import to create a bunch of nodes.
Comment #2
alanburke CreditAttribution: alanburke commentedI'll have a look sometime.
It will be really useful when we get to testing the upgrade to D7.
Location module provides a separate module to do this - I'll look there for inspiration.
Comment #3
joachim CreditAttribution: joachim commentedI started looking at this today because I'm working on the 6-7 upgrade path.
However, it's more complex than seems at first, so I'm just going to do the image import trick for now :)
Here's my work so far in case anyone else wants to take it further.
Comment #4
awolfey CreditAttribution: awolfey commentedThis will generate images and derivative sizes for the image node type when created by the devel_generate module.
It also attaches images to image_attach-enabled node types when they are created by devel_generate. A random number (up to the maximum specified in the type) of random images (selected from existing image nodes) are attached.
Comment #5
awolfey CreditAttribution: awolfey commentedOne more change. This version will use random .jpg files in image_generate/images or if that is empty misc/druplicon.jpg.
Comment #6
jonathan1055 CreditAttribution: jonathan1055 commentedI copied the unzipped folder into /modules/image/contrib/ and tested it with image 6.x-1.1 and devel 6.x-1.x dev of 2010-12-08. It all seems to be working fine so far. I will post here if I find anything more to say!
This is very useful, thanks.
Jonathan
Comment #7
awolfey CreditAttribution: awolfey commentedIf the image maintainers are interested I'm willing to release this and maintain it as a separate module.
Comment #8
jonathan1055 CreditAttribution: jonathan1055 commentedThat's good for you to offer. I know that it can work as a separate module and be stored in the /modules/ directory but an alternative is to store it in /modules/image/contrib/ and be packaged as part of image automatically, which saves having to go and get another module. I presume you could still be responsible for maintaining it?
In D7, image has become part of core. I'm not sure exactly what implications that has for the decision on (a) how image_generate would be packaged and (b) how it is maintained.
It is definitely worth having though, in my opinion.
Comment #9
joachim CreditAttribution: joachim commented> In D7, image has become part of core.
It really hasn't. Another module in core has the same name, that is all.
I'd like to get input from the other maintainer on this before I add a new submodule to the project. @sun?
Comment #10
joachim CreditAttribution: joachim commentedWell it's been 2 years (!!!) and no objections.
I find I need this now to generate content to test the Image upgrade migrations (see #513096: The Future of Image in Drupal 7).
Committing this patch, which has a few changes from the last upload:
- adapted code from Imagefield so that random images are generated
- removed functionality with the images subfolder: if you want to create nodes with specific images, use Image Import.
- code style cleanups
- changed module title to be clearer that it ties in with Devel module