Hi.
Using drupal 7.56, and Ubercart 3.10.
When this module is enabled, after I fill the order and when I press the button to fulfill it, I get this error message.
EntityMalformedException: Propiedad de paquete que falta en la entidad de tipo node. en entity_extract_ids() (línea 7929 de /web/htdocs/www.calzadossantaclara.com/home/includes/common.inc).
I have read lots of threads about similar errors for orphaned taxonomy items and some other related issues. But nothing seems to apply here, or I am not smart enough to figure what's going on.
When I disable this module, the error goes away.
Could someone enlighten me on how to go about debugging this? My drupal-module-foo is non-existant. I can find my way around php, though. Some pointers on what to look for would be fantastic.
It's worth mentioning that I modified uc_attribute_stock.module to change this line:
$email_from = _uc_stock_send_mail($form_state['uc_order'], $obj);
to:
$email_from = _uc_stock_send_mail($form_state['uc_order'], $obj, $stock);
Because that was causing another error due to an incorrect number of parameters being passed.
I doubt that has anything to do with the issue at hand. But I though I'd mention it just in case.
Any help will be much appreciated. Right now, my online shop isn't able to complete orders so it's as good as closed.
Thanks for any help!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | uc_attribute_stock.module.txt | 12.47 KB | i92guboj |
Comments
Comment #2
i92guboj commentedRrright.
This seems to work, so after all my "fix" above was the one that was creating the problem. I misread the argument list for that func.
This probably changed only recently, since I have used this module in the past without any problem, and older API docs match the original 2 args syntax. Now, it requires 3.
I hope this will help the next one stumping into this problem. I have no idea how this could be pushed upstream though. First thing would be to locate from which drupal version this syntax changed.
Cheers!
Comment #3
i92guboj commentedI had to make some more modifications to avoid some silly warnings when purchasing more than one product. In case it's useful to someone and for future reference I'll just attach the module file here.
Comment #4
MPeli commentedComment #5
MPeli commentedThank you for your help, i92guboj. I have committed your changes in file uc_attribute_stock.module.txt.
Comment #6
MPeli commentedIt should be fixed now. See the commit #f7257ca.
Comment #7
i92guboj commentedHi, and thanks for that.
I have one question, not strictly related, but here it goes anyway. If you think it's worth a new issue I can open it.
In function uc_attribute_stock_form_alter() I modified this:
The aim is not to allow people to choose things that are not available for choice.
Prior to this modification, if you had any item with, let's say, a "size" attribute, with options [35, 36, 37, 38, 39, 40, 41], and 0 stock in all of them, then all of the options would be displayed in the combo list. They would be without stock next to them, but selectable nonetheless, and the order could be completed, so you'd be selling non-existent vapor.
This created no end of trouble.
After that modification, the function proceeded as normal, but the only entry in the combobox would be "Select <...>". The list would be unpopulated, and you can't add the item to the cart, which is much preferable to the upstream behavior.
I guess that if that code snippet was added there at some point, it was for a reason. But maybe it needs to be reviewed. For now, I've just commented it in my local copy.
Again, thanks for your support :)