Hi,
I have created a simple rule to show message, after updating the content, to add a new node. It works fine in all cases except when the content type machine name has an underscore, e.g. if machine name is page_image then node add link is node/add/page-image and so my rule massage create a false link (because it creates a link site:url/node/add/page_image. How can I solve this problem. Here is the export of my rule:
{ "rules_add_more_contetent" : {
"LABEL" : "Add More Contetent",
"PLUGIN" : "reaction rule",
"TAGS" : [ "message", "node" ],
"REQUIRES" : [ "rules" ],
"ON" : [ "node_presave" ],
"IF" : [ { "entity_is_of_type" : { "entity" : [ "node" ], "type" : "node" } } ],
"DO" : [
{ "drupal_message" : { "message" : "\u003ca href=\"[site:url]node\/add\/[node:type]\"\u003eClick here to add another [node:content-type].\u003c\/a\u003e" } }
]
}
}
Thanks,
Perry.
Comments
Comment #1
fagoNothing entity api or rules can do about it, that is how core works.
Comment #2
prabhatjn commentedHere's my temporary solution:
Perry.
Comment #3
mitchell commentedDoes this issue need to be moved to core or included as a work-around in Rules?
Comment #4
tr commentedSee #1419276: Content Type alias not being used in rules