Apparently in this version vname columns in the database are sometimes stored as NULL.
But I guess that in former versions this was not the case, as all existing vname fields in the database are defined as not being able to have the NULL value.

So, when trying to save a node with NULL in vname, I'm always getting an error:
user warning: Column 'field_....._vname' cannot be null query: INSERT INTO content_type_...... (vid, nid, field_......_vname, field_......._vargs) VALUES (1954, 1918, NULL, NULL) in .../public_html/drupal-6.20/sites/all/modules/cck/content.module on line 1213.

CommentFileSizeAuthor
#6 fix-updates-1147558-6.patch920 byteskeithm

Comments

keithm’s picture

Please try the latest development release (http://drupal.org/node/96910) and report back if it fixes your problem. Once I get confirmation from the community I will issue an official release.

dwightaspinwall’s picture

Priority: Normal » Critical

This bug bit us hard as well, causing lost profile data for new registrants on a high volume site. The changes in 6003 look right to me; this is the same SQL I manually applied to production after the bug was reported. Marking this as critical -- you need to update the release now.

sun’s picture

Status: Active » Fixed

Which in turn means that this issue is already fixed.

I'll try to review all recent commits and current module code before we create a new official release.

dwightaspinwall’s picture

Status: Fixed » Needs work

Just verified that 6003 corrects the problem for us; however update.php throws the following warnings:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in update_do_one() (line 174 of /Library/WebServer/Documents/hci/update.php).
Warning: Invalid argument supplied for foreach() in update_results_page() (line 338 of /Library/WebServer/Documents/hci/update.php).

which I believe can be fixed by having viewfield_update_6002() (and viewfield_update_6001() for that matter) return an empty array.

Thanks all for this module.

sun’s picture

Right, updates 6001 and 6002 need the minimum update function contents:

  $ret = array();
  return $ret;

Applies to both 6.x-1.x and 6.x-2.x.

keithm’s picture

Priority: Critical » Normal
Status: Needs work » Needs review
StatusFileSize
new920 bytes

Patch attached.

sun’s picture

Status: Needs review » Needs work
+++ b/CHANGELOG.txt
@@ -7,6 +7,7 @@ Viewfield 6.x-1.x, xxxx-xx-xx
 Viewfield 6.x-1.1, 2011-04-27
 -----------------------------
+#1147558 by dwightaspinwall, sun: Fixed updates with empty contents.

err - existing releases cannot get any further changes! ;)

Otherwise ready to fly for both branches.

Powered by Dreditor.

keithm’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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