Active
Project:
Ubercart Restricted Shipping
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2011 at 17:10 UTC
Updated:
14 Nov 2011 at 18:19 UTC
Going along just fine for months, and all of a sudden my client is complaining of getting this error message when editing stories (not products):
user warning: Duplicate entry '2835' for key 'PRIMARY' query: INSERT INTO uc_restrict_shipping VALUES (2835, '0', '0', 0) in /home/naturalwine/naturalwine.com/sites/all/modules/uc_restrict_shipping/uc_restrict_shipping.module on line 657.
user warning: Duplicate entry '2835' for key 'PRIMARY' query: INSERT INTO uc_right_customer VALUES (2835, 0) in /home/naturalwine/naturalwine.com/sites/all/modules/uc_right_customer/uc_right_customer.module on line 50.Sure enough nid 2835 has rows in both the uc_restrict_shipping and uc_right_customer tables. So there are at least two things happening: 1) non-UC nodes are being assigned UC attributes and 2) when editing (rather than creating) a node these rows are being INSERTed rather than UPDATEd.
If it was either uc_restrict_shipping or uc_right_customer, I'd put this message in one of those queues. Because it's both there's got to be something going on above their pay grades.
Comments
Comment #1
longwaveI don't see why you think this is something that can be fixed in Ubercart, as the errors are in contributed modules. It's more likely those modules are not using the Ubercart API correctly.
Comment #2
tr commentedThis is caused by failure to check node type in hook_nodeapi(). Moving to the correct queue, as this is not an Ubercart issue.
Comment #3
smscotten commented@longwave at least allow me to defend myself; I don't think I'm a complete moron. Yes, contributed modules, but two different contributed modules. Maybe it's a coincidence that both modules have the same error that presented itself at the same time, but that's not the sort of first conclusion I jump to.
@TR thank you. I'll take a look at both modules' use of hook_nodeapi() and see what I can see.