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?

CommentFileSizeAuthor
#2 newnode-1223408-2.patch3.06 KBdrnikki

Comments

drnikki’s picture

I 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.

drnikki’s picture

StatusFileSize
new3.06 KB

sike. patch attached.

fixing this, i found a new bug re: deleting classes. I'll be creating a ticket for it now.

drnikki’s picture

Status: Needs review » Closed (fixed)
drnikki’s picture

Issue summary: View changes

solecism