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.
I am running Devel 7.x-1.x-dev with Drush 7.0-dev.
Devel generate runs normally using Devel UI, while it doesn't generate any title using drush.
The problem is
// Line 674
$type = node_type_get_type($node); // this return FALSE with drush
// Line 678
if ($type->has_title) { // this is always FALSE, so the title is not generated
I have created a patch to fix the problem.
Comment | File | Size | Author |
---|---|---|---|
#4 | devel_generate-drush-missing-title-2130357-4.patch | 571 bytes | vbouchet |
devel_generate-drush-missing-title.patch | 668 bytes | upupax | |
Comments
Comment #1
vinmassaro CreditAttribution: vinmassaro commentedRan into this issue today. This patch fixes the blank title problem when generating content from Drush. Thanks.
Comment #2
vbouchetThis patch is doing the job. A content generated from drush has a title now. Thanks.
Comment #3
Pere OrgaThe patch could be shorter:
Comment #4
vbouchetYou are right. When I had a look, I just checked there is some logic around title but nothing more. This is the patch with the short syntax.
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedComment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedOr pass-in
--types=article
another lazy solution.Comment #9
Vincenzo CreditAttribution: Vincenzo as a volunteer commentedSo, the patch was committed by moshe on September 2014, but the latest stable release for Devel 7.x is from May 2014, which means, nearly 3 years later, this issue is still "open" in the stable release of Devel. Seriously?
Comment #10
Vincenzo CreditAttribution: Vincenzo as a volunteer commented@guneysus Your workaround doesn't work.