I am trying to use rules to build a "Add another Node" workflow after the content being updated or created. But this token [node:content-type] does not take the alias of the node type if the URL alias having the separator short dash "-". For example, I have a content type "Book Page", The "Add another node" link will go with node/add/Book Page instead of node/add/book-page.

Am I doing something wrong or it is a bug?
My token version is:7.x-1.0-beta7, and rules version: 7.x-2.0, pathauto: 7.x-1.0, with Drupal 7.8

Any help/advices would be greatly appreciated!

Comments

dave reid’s picture

Project: Pathauto » Rules
Version: 7.x-1.0 » 7.x-2.x-dev
Component: Code » Rules Engine

Rules doesn't really have anything to do with Pathauto and the token is working as expected because the token value of [node:content-type] in this case is actually 'Book Page'. Transferring to the Rules issue queue.

ouyang1512’s picture

Thanks for transferring this issue to the right place!

ouyang1512’s picture

Anybody can replicate this or just my issue?

tr’s picture

Component: Rules Engine » Rules Core
Category: Bug report » Support request
Issue summary: View changes
tr’s picture

Status: Active » Fixed

*Some* of the available tokens are listed in "Replacement patterns". But when you expand the "Replacement patterns" container, you see the following message:

Note that token replacements containing chained objects – such as [node:author:uid] – are not listed here, but are still available. The data selection input mode may help you find more complex replacement patterns.

Also note that while core Drupal provides tokens, many others are provided by the optional Token module if you have it installed, or by other contributed modules like Entity tokens.

So a core token for the machine name of the type would be [node:type], while the contributed Token module also gives you [node:content-type:machine-name].

There should be a better way to browse the available tokens, but that's outside the scope of this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.