Pb with content in email sent by a rule

Topics: Customizing Orchard, General, Troubleshooting
Dec 18, 2012 at 8:05 AM

I have a custom content type named Trainee and a Custom Form to input its fields.

I created a rule triggered on Trainee creation with an email action.

The email is sent but I am unable to collect the Trainee field values in its body.
The tags are no replaced by values? 

I am using the tags proposed in the email body with values like:


Candidat
Name: {Content.Fields.Trainee.Name}
Firstname: {Content.Fields.Trainee.Firstname}
Email: {Content.Fields.Trainee.email}
Tel: {Content.Fields.Trainee.Phone}
Fonction: {Content.Fields.Trainee.Fonction}
Service: {Content.Fields.Trainee.Service}
Company: {Content.Fields.Trainee.Company}

Why these tags are proposed if they don't work, this looks like a bug ?
What is the system ? 

Which values could I use in my email ?

Thanks for help

Coordinator
Dec 19, 2012 at 1:31 AM
Edited Dec 19, 2012 at 1:33 AM

Do none of those work, or only some of them? Are you sure you need ".Trainee" in the token path? Where did you get the syntax from?

Dec 19, 2012 at 7:19 AM
Edited Dec 19, 2012 at 7:20 AM

None works, even adding .Value or .Text or other combinations.

I take it from the helper button listing tokens in the email action from rules and from various Q&A in stackoverflow + discussions here.

It appears that the helper is not very useful, leading to vaste user time,   because it lists every existing token in system, it should be limited to available tokens in this email body?

Coordinator
Dec 19, 2012 at 6:40 PM

It can't know what tokens are going to be available at runtime.

Can you attach a debugger and maybe put a breakpoint in the content token code?

Dec 19, 2012 at 6:58 PM
Edited Dec 19, 2012 at 7:03 PM

Will do it, custom forms are a very useful piece of Orchard, and even will be better with new workflow...they are worth some time investment.

far from the scope of this thread.....
Learning Orchard v1.6, sometime I have this question, who wrote this and at what time ? you were certainly in the inner team, someone else ? some no more in the boat ? Who get the idea ?

There should be some historical thread here, not only technical thoughs...