Closed (fixed)
Project:
Node Class
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
19 Jul 2011 at 14:41 UTC
Updated:
3 May 2012 at 14:39 UTC
Jump to comment: Most recent file
After saving the new content I get the following warning, and the class that I have is not saving.
user warning: Duplicate entry '' for key 'PRIMARY' query: INSERT INTO node_class (nid,css_class) VALUES('','pageBackground3') in /home/social/public_html/sites/all/modules/node_class/node_class.module on line 91.
After of editing already added content all is okay, specified class is saved and no warning is displayed. What the problem might be?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | newnode-1223408-2.patch | 3.06 KB | drnikki |
Comments
Comment #1
drnikki commentedI haven't looked at the d6 version of the module, but I'm pretty sure it's the same problem that existed here: http://drupal.org/node/1460056
The nid doesn't exist when the insert statement is being run because it's running on form submit instead of nodesave. Happy to add a patch later today if you need help.
Comment #2
drnikki commentedsike. patch attached.
fixing this, i found a new bug re: deleting classes. I'll be creating a ticket for it now.
Comment #3
drnikki commentedcommitted. http://drupalcode.org/project/node_class.git/commit/c9246ac
Comment #3.0
drnikki commentedsolecism