The commerce_checkout_panes() function loads panes from the database and then invokes hook_commerce_checkout_pane_info(). Any panes returned from the hook that also exist in the database get a 'saved' key set to true. This saved key triggers an update rather than an insert. Because this module does not implement hook_commerce_checkout_pane_info(), but instead incorrectly inserts new fieldgroup panes in hook_commerce_checkout_pane_info_alter(), the fieldgroup panes are always inserted into the database as new records causing an error if it already exists.

Perhaps those who decided that hook_commerce_checkout_pane_info_alter() was necessary over hook_commerce_checkout_info() could chime in, but it seems to be working find using the latter.

Cheers,

Antoine

Comments

jantoine’s picture

Status: Active » Needs review
StatusFileSize
new1.7 KB

Patch attached!

Cheers,

Antoine

jantoine’s picture

StatusFileSize
new1.7 KB

New patch attached that respects existing whitespace characters.

pcambra’s picture

StatusFileSize
new1.62 KB

I can confirm the error and the fix.

Here's the patch adapted to the right path and slightly changed.

pcambra’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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