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've created a token_workflow.inc to handle a few variables via the workflow module, should this be included with workflow or in token?
See: http://drupal.org/node/157187
Comment | File | Size | Author |
---|---|---|---|
#11 | workflow_tokens.diff | 3.58 KB | JacobSingh |
#7 | workflow_tokens.diff | 3.58 KB | JacobSingh |
#6 | workflow_tokens.diff | 3.62 KB | JacobSingh |
Comments
Comment #1
Harry Slaughteruseful patch.
is workflow module abandoned? i see a huge queue and little activity.
Comment #2
jvandyk CreditAttribution: jvandyk commentedI'm in the midst of a vast porting project. Once the project is on Drupal 5, it will use workflow. Then I will be able to justify spending time on it.
Comment #3
tanoshimi CreditAttribution: tanoshimi commentedSorry for such a daft question, but what do I need to do/ where do I need to place this token_workflow.inc file in order to be able to make use of the new tokens it defines?
I've put it alongside the existing .inc files in the token module directory, but it hasn't replaced any of the defined tokens. Do I need to edit token_include() in token.inc to include it?
thanks.
t.
Comment #4
JacobSingh CreditAttribution: JacobSingh commentedHi Tanoshimi, it does in fact need to be included manually (either from workflow.module or anywhere else in your code base). I made an inc rather than another module because it belongs as part of workflow.
Comment #5
tanoshimi CreditAttribution: tanoshimi commentedThanks for the advice - I've tried to include() this file in my existing workflow.module but I must have not done something right because using tokens such as [workflow-current-state-name] in autonodetitle of a node type which had workflow states defined didn't replace the token....
Then I even tried just copying and pasting the workflow_token_list() and workflow_token_values() functions directly into the workflow.module file, and that didn't work either...
Sorry to bother you, but any ideas how I can go about troubleshooting what I might have done wrong?
Comment #6
JacobSingh CreditAttribution: JacobSingh commentedHere is a new patch, try to apply this and see if it works.
Comment #7
JacobSingh CreditAttribution: JacobSingh commentedOkay, let's try that one more time, this time, with testing!
Comment #8
tancJacobSingh, can you explain a little more about what your patch does and how to implement it?
So far I've had trouble applying the patch against either the CVS or the main release of the workflow.module. I've also pasted it into the end of the module and no errors are thrown but it doesn't seem to be working. From what I can tell there should be a whole load of workflow tokens available to other modules but I'm not seeing them in the lists, the only one that is listed is 'workflow-name'.
I'm particularly interested in integrating the Workflow-ng and Workflow modules using this patch to detect states in Workflow from Workflow-ng. Any advice is greatly appreciated.
Comment #9
JacobSingh CreditAttribution: JacobSingh commentedHi Tank,
which patch did you apply? I uploaded a couple of them without good testing. Try the last one, and install pathauto 5.2.2, that uses tokens and I tested with it.
Comment #10
tancThanks for replying so quick! I've tried to apply the latest patch you uploaded on the 28th (today) but with no success. If I copy and paste from the provided diff file (getting rid of all + signs) the module appears to partially work in that one new token pattern appears.
I have Pathauto installed and when checking through the token list (replacement patterns) for node path settings I only see one new item called 'workflow-name'. Should I be seeing all the rest (workflow-state etc)?
Comment #11
JacobSingh CreditAttribution: JacobSingh commentedSorry, I screwed up an uploaded an old one.
Comment #12
tancAwesome, that worked fine when I copied and pasted to the end of workflow.module. Now all the additional replacement patterns are showing up. Your patch file still doesn't want to work for me, I'm not sure if its something I'm doing wrong. I get the following error message after patching with this command:
Anyway, thanks for submitting this patch, I'll now have a play with the new tokens.
Comment #13
JacobSingh CreditAttribution: JacobSingh commentedAdded in DRUPAL-5
Comment #14
deekayen CreditAttribution: deekayen commentedThis made it in to 6.x-1.1 at the bottom of workflow.module.