ajaykumar
ajaykumar

Reputation: 35

creating an alias on event after saving content with rules in drupal 7

I have created two rules In 1st rules

event :-After saving a new user account

condition:-
User has role(s) Parameter: User: [account], Roles: teacher.

Action:- Create a new entity Parameter: Entity type: Node, Content type: teacher`s profiles, Title: [account:name], Author: [account] Provides variables: Created entity (entity_created)

And In second rules:-

I have taken following things:-

Event:-After saving new content. condition:- Content is of type Parameter: Content: [node], Content types: teacher`s profiles.

Action:- Create or delete a content's URL alias Parameter: Content: [node], URL alias: node/[site:current-user]/edit.

The First rule Work perfectly But the problem is in second rules it create an alias with the url: node/anonymous/edit

I don`t know what is the problem in this rule anyone can help me.

Thanks in advance

Upvotes: 1

Views: 518

Answers (2)

Rahul Yadav
Rahul Yadav

Reputation: 1

In place of token [site:current-user], you have to use token [node:author:name].

Upvotes: 0

Bhavin Joshi
Bhavin Joshi

Reputation: 522

There must be an option for 'Operating user' or 'Current user'. if the user creates the event as visitors and no values is provided for the 'user', it will, of course, take 'anonymous'!

Upvotes: 0

Related Questions