Hello,

Today we noticed that one of our order's revisions had been changed after it had been created.

At 2014-08-06 00:00 order revision 23284 looked like this:

order_id = 9161
order_number = 9161
revision_id = 23284
revision_uid = 0
mail =
status = checkout_checkout
log = Customer proceeded to checkout using a submit button.
revision_timestamp = 1407252069
revision_hostname = 81.234.150.205

At 2014-08-06 14:41 order revision 23284 looks like this:

order_id = 9161
order_number = 9161
revsion_id = 23284
revision_uid = 1
mail = 
status = checkout_checkout
log = Customer proceeded to checkout using a submit button.
revision_timestamp = 1407320780
revision_hostname = 193.14.79.226

Please note the timestamp and user has been changed. Now, it claims user 1 (admin) "proceeded to checkout using a submit button"?

How can this happen? Can order revisions indeed be changed? We are alittle concerned with tracability and integrity on our end...

Best

Eric

Comments

periksson’s picture

Issue summary: View changes

This revision is the current revision of this order. The revision is updated on every pageview when viewing the order in admin. We're still surprised this is happening, we really thought versions are versions as in most ECM/CMS systems.

rszrama’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Revisions for Drupal Commerce entities are functioning in this regard as revisions of other Drupal entity types. The current revision can be updated and you must tell the entity controller specifically to create a new revision on save. Note that it's the revision_uid that changed, not the uid of the order itself, which is useful for indicating which user triggered the latest update to the current revision. However, I might recommend you edit you order settings and change the setting so shopping cart orders are only refreshed by the user who owns them; that'll prevent the refresh from happening when an admin views an order listing.

deardagny’s picture

Status: Closed (works as designed) » Active

Sorry for reopening, but I'm facing a similar issue and need to disable Shopping Cart order refreshes when an admin views orders (as @rszrama mentioned). However, I don't see anywhere to "edit your order settings and change the setting so shopping cart orders are only refreshed by the user who owns them." I've looked through all relevant Rules and config pages, but have no idea what settings Ryan is referring to. Can someone shed some light?

rszrama’s picture

Status: Active » Closed (works as designed)

In the future, please use Drupal Answers for these sorts of support requests.

Make sure you're on the latest Commerce 1.x and navigate to Administration > Store > Configuration > Order settings and you'll see what I've described in the "Shopping cart refresh" fieldset on that form. Cheers!