Hi
Can any of you cool and nifty Drupal ninjas help a poor ignoramus like me?
At some time or other I mistakenly entered a URL path 'salons/strathmore' into the Node Class field when creating content. Now whenever I try to create new content in the normal manner: 'create content' > 'Page' etc the Node Class field is being auto filled with my original mistake 'salons/strathmore'.
Then when I try to save the content - I get an SQL error
user warning: Duplicate entry '' for key 'PRIMARY' query: INSERT INTO node_class (nid,css_class) VALUES('','salons/strathmore') in C:\wamp\www\youthoncall-cms\sites\all\modules\node_class\node_class.module on line 91.
It's not actually causing a major problem, as the INSERT INTO query is being rejected, but it's a horrible looking error that I can't leave in a production site.
I've tried uninstalling the node ID module and then re-installing but the error persists.
Any bright ideas?
Thanks
Comments
Comment #1
bonzo46 commentedWell, I hope I've fixed it without causing a major issue.
I just went into the database table and deleted the entry for that class. There was no node id assigned to it, so my guess is it won't cause any kind of error. The problem has gone.
But if any experts can comment, I'd appreciate it.
Perhaps the UI field could do with a validation layer to prevent mistakes such as the one I mentioned above. Entering data intended for another field is an easy mistake to make.
Comment #2
drnikki commentedbonzo46 - a check for invalid characters would be appropriate. If it makes you feel any better though - you fixed it correctly. entries from the node_class table can be deleted.
Comment #3
drnikki commentedComment #4
anybodyComment #6
anybody