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.
Not sure if it's a WF_ng or token bug.
I have a user reference. When I output a message with [node:field_user_reference_x-uid] it works ok, when I use [node:field_user_reference_x-name] it has no value
Comment | File | Size | Author |
---|---|---|---|
#3 | Snap1_21.png | 3.53 KB | amitaibu |
Comments
Comment #1
fagosounds like a token bug to me.
Comment #2
greggles[node:field_user_reference_x-uid]
and
[node:field_user_reference_x-name] are not valid tokens as provided by token module.
The valid format should be
[field_user_reference_x-name]
FWIW, I just tested this feature in both pathauto and auto node title and it worked fine.
Comment #3
amitaibuGerggles,
1. [node:field_user_reference_x-uid] does seem to work.
2. snap1 is from 'Replacement patterns for updated content'.
Comment #4
gregglesI'm using version = "5.x-1.x-dev"
Based on 1.4.2.15
I can't repeat your problem with the instructions you give. So, afaic, it's not a problem.
Comment #5
amitaibu@greggles, thanks for the checking.
@Fago, I think this one is a Workflow-ng issue, and here's why - When I look at the 'Replacement patterns' under autonode title, I see the pattern is [nid], [type] and so on.
In WF-ng the patten appears as [node:nid], [node:type] etc'.
Here's my configuration:
Comment #6
fagoThe replacement string is correct - workflow-ng invokes token with different prefixes for different entities (prefix == [node:), so that they can be distinguished, e.g. [node:title] vs [node_unchanged:title]. Auto nodetitle uses token default, which is prefix "[" -> [title]. So there is no bug here.
amitaibu, please try it again with the token version greggles stated to work. If it still doesn't work for you please try this token with auto nodetitle.
Comment #7
amitaibuFago,
Can you please send me a link of Gerggles version, I don't really understand what he means by "Based on 1.4.2.15"
(So far I've used token 5-1.9 and 5-1.DEV)
Comment #8
gregglesI was quoting a specific version of Automatic Node Titles that worked for me - not token.
So, it sounds like you need to be sure that the tokens you use for ANT are appropriate for that realm and the ones for Workflow-NG are the appropriate ones for that realm.
Fago - on a related note I just implemented a token parser for pathauto which finds tokens within patterns, checks if they look reasonable for that scope, and if not then warns them about it. That's starting to feel like a useful feature to have in token core, right?
Comment #9
fagoops, sry I thought this was the token version. Hm, amitaibu so can you test it with the latest auto nodetitle dev snapshot? Be sure to test it with the right content type. If it does work there, it looks like a bug in workflow-ng, although I can't imagine this ugly bug ;)
@greggles: yep, that sounds like an amazing feature. This would be a great improvement for auto nodetitle too. But how do you check if it's reasonable for that scope? Is there a way to specify this information for tokens?
Anyway, I don't think amitaibu got hit by that, as another token for the same field [node:field_user_reference_x-uid] is working.
Comment #10
amitaibuOk, I see that in this specific content type also when using Autonode titles no matter what token I use, the title is ANT.
Comment #11
gregglesAmita - one problem per issue. I believe I know the solution to #10 and I refuse to mention it on the grounds that there should only be one problem per issue.
Comment #12
gregglespracticing what I preach: fago - I created a new feature request for that checkup feature http://drupal.org/node/188769
Comment #13
amitaibu@greggles, I thought I was answering the requirement of one problem per issue ;) I simply replied to Fago question:
So, now we know it's not a WF_ng issue. I guess the title and project should change, but I'm not sure to what.
Cheers,
Amitai
Comment #14
fagohm, that's strange. If it would be a token problem, the title wouldn't be ANT. Don't know what's wrong here, but that seems to be another issue. Perhaps some modules are interfering there.
Try deactivating modules and/or try to reproduce bugs on a clean install. Auto nodetitle shouldn't behave like this on a clean install.. If you got it working, test the token with it.
@greggles: I agree that there should be one problem per issue. :)