1

Commerce has a problem with the Rule to create a new User account for an anonymous order:

ERROR: Missing configuration for parameter param_field_[fieldname]

According to a drupalcommerce.org comment this is because of fields being required:

The rule “Create a new account for an anonymous order” will fail if any of the fields it attempts to create are required. That failure will generate the ERROR: Missing configuration for parameter param_field_.

Despite this insight, no answer is give for how to take care of the error. It is necessary to my site to require some fields upon user registration. How can I get rid of this error?

2
  • Have you tried removing the "required" attribute to your fields and checking if that removes the error? Commented Jun 25, 2012 at 14:28
  • Yes, removing the requirement removes the error. However, I need to require certain fields. I'm asking for a solution that allows fields to be required.
    – beth
    Commented Jun 25, 2012 at 14:34

2 Answers 2

2

During anonymous checkout, an email address is collected from the 'Account information' pane to create a new user (or append the order to an existing user).

You should be able to hook into the form on the 'Account information' pane and add your required fields. You will probably have to modify the rule (Create a new account for an anonymous order) to send along the extra fields for creating a new user with the required fields - when marked required, custom fields added to the user are added to the Create Entity action for user as well.

You can populate these fields using existing variables, or fields added to the Commerce Order or Commerce Billing Profile, or create your own variables (eg via hook_token_info_alter() to make variables available through the commerce_order).

2
  • Thanks. I've got my rulesets open but I'm not sure if I should edit the built-in one or create a new one. Either way, what action(s) does this require? Do I do something to the user profile entity, or?
    – beth
    Commented Jun 25, 2012 at 15:47
  • This saved my day. Here is the tip: "If you make a field in user account as Required, it will appear in Create Entity action for User."
    – Alexar
    Commented Feb 17, 2015 at 7:32
0

Another option is to use the Commerce User Profile Pane and add the required field(s) to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.