Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I have a computed field for a node which is an Ubercart product.
During checkout, the field content is being deleted from the database.
Code for my field is:
$nid = $_GET[product_nid];
$title = db_result(db_query("SELECT title FROM {node} WHERE nid = %d", $nid));
$node_field[0]['value'] = $title;
Thanks
Glenn
Comments
Comment #1
Moonshine CreditAttribution: Moonshine commentedFrom the code, and considering this is a Ubercart checkout process, it would be very hard to say. If this is still a problem for you, I'd start by checking that $_GET[product_nid] is always available to your computed field throughout checkout. If it isn't then you'll certainly save an empty value with that code. You could check this by adding the following to your computed code on you development machine and running through checkout:
Comment #2
mmjvb CreditAttribution: mmjvb as a volunteer commented