Closed (fixed)
Project:
Automatic Nodetitles
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2010 at 14:59 UTC
Updated:
16 Jul 2018 at 07:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
asciikewl commentedDrat. It seems to be suffering from the problems with token replacement :(
Comment #2
skizzo commentedSubscribing (see also http://drupal.org/node/360359#comment-1460918 )
Comment #3
asciikewl commentedSeems I have it working. It was failing to update the node titles because drush runs as UID0. So by adding:
--- a/modules/auto_nodetitle/auto_nodetitle.drush.inc
+++ b/modules/auto_nodetitle/auto_nodetitle.drush.inc
@@ -32,6 +32,8 @@ function auto_nodetitle_drush_help($section) {
* Drush callback to perform actual auto_nodetitle preset flush.
*/
function drush_auto_nodetitle_drush_update() {
+ global $user;
+ $user = user_load(1);
$args = func_get_args();
if (empty($args)) {
drush_set_error(dt('You must specify a node type name to recreate or specify "all".'.
It seems to fix it.
Rename attached file to auto_nodetitle.drush.inc
Comment #4
xamanu commentedtested #3 with a specific content type. Works like a charm. Thank you! :-)
Comment #5
asciikewl commentedHere is a _very_ quick re-write for d7.
Comment #6
christowm commentedI tested out the D7 version of this drush command and it still had a D6 function call in it. Replaced the function call with the appropriate D7 version and it works like a charm now.
Comment #7
msielskiThe code from #6 works for the most part, but there were a few bugs which prevented the last block of nodes from ever being updated. I fixed that and cleaned up a few other minor points. This is for D7.
Comment #8
manish-31 commentedI added this file into my module and ran drush commands. Commands worked fine, therefore marking it as RTBC.
Comment #9
manish-31 commentedI added this file into my module and ran drush commands, commands work properly. Hence marking it as RTBC.
Comment #11
gaurav.kapoor commented