Drupal 7.34
PHP 5.5.20
Error
Saving any content type in '/admin/structure/types/manage/' with RDF UI sub module enabled. Seems that rdfui_form_node_type_form_submit() fail to define the bundle type
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'bundle' cannot be null: INSERT INTO {rdf_mapping} (type, bundle, mapping) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => a:9:{s:7:"rdftype";a:4:{i:0;s:19:"schema:CreativeWork";i:1;s:9:"sioc:Item";i:2;s:13:"foaf:Document";i:3;s:13:"madsrdf:Title";}s:5:"title";a:2:{s:10:"predicates";a:1:{i:0;s:11:"schema:name";}s:4:"type";s:8:"property";}s:7:"created";a:3:{s:10:"predicates";a:2:{i:0;s:7:"dc:date";i:1;s:10:"dc:created";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:7:"changed";a:3:{s:10:"predicates";a:1:{i:0;s:11:"dc:modified";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:4:"body";a:1:{s:10:"predicates";a:1:{i:0;s:15:"content:encoded";}}s:3:"uid";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:has_creator";}s:4:"type";s:3:"rel";}s:4:"name";a:1:{s:10:"predicates";a:1:{i:0;s:9:"foaf:name";}}s:13:"comment_count";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:num_replies";}s:8:"datatype";s:11:"xsd:integer";}s:13:"last_activity";a:3:{s:10:"predicates";a:1:{i:0;s:23:"sioc:last_activity_date";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}} ) in rdf_mapping_save() (line 255 of drupal/modules/rdf/rdf.module).
Reformatted error message
Perhaps easier to read
Array (
[:db_insert_placeholder_0] => node
[:db_insert_placeholder_1] =>
[:db_insert_placeholder_2] => a:9:
{
s:7:"rdftype";a:4:
{
i:0;s:19:"schema:CreativeWork";i:1;s:9:"sioc:Item";i:2;s:13:"foaf:Document";i:3;s:13:"madsrdf:Title";
}
s:5:"title";a:2:
{
s:10:"predicates";a:1:
{
i:0;s:11:"schema:name";
}
s:4:"type";s:8:"property";
}
s:7:"created";a:3:
{
s:10:"predicates";a:2:
{
i:0;s:7:"dc:date";i:1;s:10:"dc:created";
}
s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:7:"changed";a:3:
{
s:10:"predicates";a:1:{i:0;s:11:"dc:modified";
}
s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";
}
s:4:"body";a:1:
{
s:10:"predicates";a:1:
{
i:0;s:15:"content:encoded";
}
}
s:3:"uid";a:2:
{
s:10:"predicates";a:1:
{
i:0;s:16:"sioc:has_creator";
}
s:4:"type";s:3:"rel";
}
s:4:"name";a:1:
{
s:10:"predicates";a:1:
{
i:0;s:9:"foaf:name";
}
}
s:13:"comment_count";a:2:
{
s:10:"predicates";a:1:
{
i:0;s:16:"sioc:num_replies";
}
s:8:"datatype";s:11:"xsd:integer";
}
s:13:"last_activity";a:3:
{
s:10:"predicates";a:1:
{
i:0;s:23:"sioc:last_activity_date";
}
s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";
}
}
Have no idea why it fail to pick up bundle before saving.
Comment | File | Size | Author |
---|---|---|---|
#5 | rdfx-bundle_cannot_be_null-2457795-5.patch | 981 bytes | barig |
#3 | 2457795-bundle_cannot_be_null.patch | 729 bytes | steinmb |
Comments
Comment #1
steinmb CreditAttribution: steinmb commentedRetested with the latest dev. and still the same problem.
Comment #2
steinmb CreditAttribution: steinmb commentedA little more digging around in the form API.
$form_state['input']['type']
is NULL. if I as in the example below dump the variable.Comment #3
steinmb CreditAttribution: steinmb commentedTested and seems to be a safer place to pick up the bundle name.
Comment #4
steinmb CreditAttribution: steinmb commentedComment #5
barig CreditAttribution: barig commentedHi all,
I rolled back the patch to apply properly with a project.make ( module path was not relative to module root ).
The patch is generated from 7.x-2.0-alpha4.
Hope it helps!
Comment #6
steinmb CreditAttribution: steinmb commentedDoh, thank you. Did not notice that when I created the patch. Note: All patches must be generated from the latest dev.
Comment #7
dureaghin CreditAttribution: dureaghin commentedTested with latest dev version + patch #5.
I'm getting the same error:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'bundle' cannot be null: INSERT INTO {rdf_mapping} (type, bundle, mapping) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => a:9:{s:7:"rdftype";a:2:{i:0;s:9:"sioc:Item";i:1;s:13:"foaf:Document";}s:7:"created";a:3:{s:10:"predicates";a:2:{i:0;s:7:"dc:date";i:1;s:10:"dc:created";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:7:"changed";a:3:{s:10:"predicates";a:1:{i:0;s:11:"dc:modified";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:4:"body";a:1:{s:10:"predicates";a:1:{i:0;s:15:"content:encoded";}}s:3:"uid";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:has_creator";}s:4:"type";s:3:"rel";}s:4:"name";a:1:{s:10:"predicates";a:1:{i:0;s:9:"foaf:name";}}s:13:"comment_count";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:num_replies";}s:8:"datatype";s:11:"xsd:integer";}s:13:"last_activity";a:3:{s:10:"predicates";a:1:{i:0;s:23:"sioc:last_activity_date";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:5:"title";a:1:{s:10:"predicates";a:1:{i:0;s:8:"dc:title";}}} ) in rdf_mapping_save() (line 255 of /modules/rdf/rdf.module).
Comment #8
Chris CharltonUgh. Just got stung by this. :(
Comment #9
steinmb CreditAttribution: steinmb commented@chris - Did the patch address the issue?