"Unable to continue, you are unable to register for this item. Please remove it from your cart."

I just upgraded from beta3+20 to beta3+31 and I'm stopped at the registration pane because I don't have permission to register for the item that doesn't have a registration. Checking out with an event I have permission to register for works.

Comments

ponies’s picture

Anonymous users can checkout without any problems.

If I bypass the registration pane I get this error on review,

Notice: Undefined index: register_entities in commerce_registration_information_review() (line 335 of /var/www/drupal/sites/all/modules/commerce_registration/includes/commerce_registration.checkout_pane.inc).

EntityMetadataWrapperException: Missing data values. in EntityMetadataWrapper->value() (line 83 of /var/www/drupal/sites/all/modules/entity/includes/entity.wrapper.inc).

jpontani’s picture

Status: Active » Needs review

Try the latest dev, I just committed a fix that should take care of the initial issue.

http://drupalcode.org/project/commerce_registration.git/commit/7e5aa90

mrfelton’s picture

I dont thin that fixes it. The problem seems to be that you are mixing up your own checkout form elements with other checkout form elements when you build the checkout pane. If you look at the way that ll other checkout panes do this, they start a fresh form array and build and return that, rather than modifying the $form array that gets passed to the checkout pane form builder function.

This is also having strange effects in causing some other checkout panes to render twice on the form.

ponies’s picture

Trailing whitespace on line 9.

Checking out with a non-registration product throws this error for me:

PHP Fatal error:  Call to a member function asXML() on a non-object in /var/www/drupal/sites/all/modules/commerce_usps/commerce_usps.module on line 162, referer: https://localhost/checkout/1647/checkout

Buying a product with registration works well. Might be a commerce_usps bug now.

mrfelton’s picture

@ponies - that looks unconnected to this error. I'd suggest opening an issue about that in the commerce_usps queue

ponies’s picture

I fixed the usps bug, applied #3 to dev and am receiving the same error:

Notice: Undefined index: prod-DVDISBE in commerce_registration_information_review() (line 339 of /var/www/drupal/sites/all/modules/commerce_registration/includes/commerce_registration.checkout_pane.inc).

EntityMetadataWrapperException: Missing data values. in EntityMetadataWrapper->value() (line 83 of /var/www/drupal/sites/all/modules/entity/includes/entity.wrapper.inc).
mrfelton’s picture

Updated patch without the whitespace issue

jpontani’s picture

Status: Needs review » Fixed
drumm’s picture

Assigned: Unassigned » drumm
Status: Fixed » Needs review
Issue tags: +portland2013, +da_drupalcon (duplicate)
StatusFileSize
new1.34 KB

http://drupalcode.org/project/commerce_registration.git/commitdiff/7e5aa... isn't quite complete for this. Attached is a patch which updates the condition to match on validate and submit. To reproduce the issue, you need to be an admin who always has access to register.

jpontani’s picture

Status: Needs review » Fixed

Committed. Forgot that registration_status always is true for admins. Good catch.

http://drupalcode.org/project/commerce_registration.git/commitdiff/80a2f91

drumm’s picture

Status: Fixed » Needs review
StatusFileSize
new834 bytes

One more of the same change.

ponies’s picture

I think that last patch fixed it for me. Thank you!

jpontani’s picture

Status: Needs review » Fixed

Committed to dev. Thanks!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.