The rule to 'Create a new account for an anonymous order' is not working for me.

I go through the checkout as anonymous, all successful, but no account is created. The order notification email is sent, but no account related email.

Thanks.

Comments

rszrama’s picture

Status: Active » Postponed (maintainer needs more info)

It's working fine for me on the Commerce Kickstart for Commerce 7.x-1.0-rc1. Are you getting any debug information in the PHP error logs or site's watchdog? Do you have other modules installed that could interfere here?

ktleow’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc3
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

I'm getting the error after checkout, throws this exception.

But I'm still getting email notification for order creation though.

EntityMetadataWrapperException: Unable to get the data property profile_id as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 430 of /usr/htdocs/drupal7/sites/all/modules/entity/includes/entity.wrapper.inc).

This could be related? Since its unable to get profile_id, hence no account created. Just random guessing.

EDIT 1:

The variable $data inside function getPropertyValue() inside entity does contain a value.

$data = $this->value();

But the following if (!isset($data)) fails and throws exception.

EDIT 2:

Found the part thats causing the problem:

Array
(
    [label] => Profile ID
    [description] => The internal numeric ID of the profile.
    [type] => integer
    [schema field] => profile_id
    [getter callback] => entity_property_verbatim_get
    [clear] => Array
        (
        )
 
    [parent] => EntityDrupalWrapper Object
        (
            [id:protected] => 

parent->id is null.

EDIT 3:

I've enabled the 'Billing information' pane in checkout and now it works. So, a check has to be done for this part.

illuminatico’s picture

I am also getting this problem. Billing information pane is enabled. No order confirmation email is being sent. No errors showing up in Log.
I'm not using the Kickstart install.

illuminatico’s picture

Version: 7.x-1.0-rc3 » 7.x-1.x-dev

Upgraded to dev version. Still no new account created.

rszrama’s picture

Status: Active » Fixed

I had this problem for a client, and the trouble turned out to be a "dirty" flag on the Rule. The latest version of Rules fixes this. The problem was that the site had a custom customer profile defined but didn't use the reference field Commerce expected when defining the default checkout Rules. This caused Rules to not see that default Rule at all, skipping account creation. I fixed this bug in Commerce itself and then fago fixed the bug in Rules so that Rules that have been fixed via the UI will no longer be flagged as dirty. I hope this helps you.

Status: Fixed » Closed (fixed)

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

fricupy’s picture

Status: Closed (fixed) » Active

Hi rszrama,
could you please explain me more in details how do you fix this problem.
I use commerce 7.x-1.x-dev and i've still have the problem.

rszrama’s picture

Category: bug » support
Status: Active » Closed (fixed)

It should be fixed by updating to the latest Rules release and clearing your cache.

Yuri’s picture

Status: Closed (fixed) » Active

I have the latest dev version of commerce (v. 19 Jan 2012) and the create account rule is not working, even after updating Rules to the latest dev version (v. 10 Jan 2012).

EDIT: account creation not working when using PayPal WPS. When using test payment it does work. Anyone having tried with PayPal WPS?

rszrama’s picture

Status: Active » Closed (fixed)

Whatever it is, it's not the Rule in Commerce that's broken. It's either something in your site configuration or the PayPal module, so go ahead and open a separate issue if necessary. However, my hunch is that it doesn't have anything to do with the account creation process but the fact that returning from PayPal WPS as an anonymous user is broken by this issue: #1362412: commerce_checkout_access() blocks anonymous checkout

leex’s picture

For those having this issue - an account will not be created if you make the order using an email already registered as a person with Drupal.

This confused me for so long!

rszrama’s picture

Right, in that case it assigns the order to the existing user account.

bendev’s picture

Status: Closed (fixed) » Needs review

I am having the same issue with the version 7.X.2.2 of rules
checkout pane (billing and shipping) are enabled
I have tried both paypal and bank transfer and always have the issue
i Used a new email for the anonym account

I get the order email but not the email for the new account

I din't use the commerce quickstart.
I have another install with kickstart where it works;
I compared the rules and they look identical...

thanks for your suggestions

rszrama’s picture

Status: Needs review » Closed (fixed)

Sorry, we aren't handling ongoing support requests like this in the issue queue. Since the relaunch of DrupalCommerce.org back in May, we opened a new Questions area for continued help on issues like yours. Feel free to repost your question at http://www.drupalcommerce.org/questions, but please remember that unless you can provide steps to reproduce the problem on a clean install of Drupal Commerce / Kickstart 1.x, it's going to be near impossible for anyone to help you.

bendev’s picture

Thanks for the info Ryan.

In the mean time I found the issue. I had created different order types and I needed to adapt a condition of the rule to take the new order types also into account... Now the rule fires as expected....

alberto56’s picture

Issue summary: View changes

Hi,

I'm using 7.x-1.9 and having this problem:

- extra compulsory fields in User profile broke the rule
- i cloned the rule and fixed the clone by mapping the extra fields
- on every clear cache, I always get the message "Rule was marked as dirty, but it's ok now"
- i removed the clone and fixed the original rule by mapping extra fields.
- still no go

There is nothing in my drupal watchdog.

How could one go about debugging this? I turned on Rules debugging but it gives me no messages.

Cheers,

Albert.