MukurtuCMS / mukurtucms

GNU General Public License v2.0
83 stars 36 forks source link

Add pre-migration step checking for null entity labels #159

Open taylor-steve opened 10 months ago

taylor-steve commented 10 months ago

During migration testing on real world data, we are seeing:

Integrity constraint violation: 1048 Column 'title' cannot be null

I think in D7 we might need to use Entity Metadata Wrappers to do this? Something like:

$entity = node_load($nid);
$wrapper = entity_metadata_wrapper('node', $entity);
$wrapper->validate();

Then we need to catch any exceptions thrown by validate? I haven't done this in D7 for too long, I don't remember exactly how it works.