I have a talent for finding the hard issues. I have a custom migration class importing taxonomy terms. The class is an in-house customization, and we have it working happily on other sites. On my site, it is not working. There is a chance this is related to the data, which is coming from the client and possibly not clean. Here is my issue. I am implementing the public function prepareRow($current_row) with the intent of skipping some rows that I know will cause trouble. Specifically, anything with a non-numeric id value.
I know the function is called, I see "Gojira!" appear
I know the value that is causing an error
The function is not being respected by the system.
Here is my function:
public function prepareRow($current_row) {
$safe = FALSE;
if(is_numeric($current_row->id)){
$safe = TRUE;
// problem value is $current_row->id == 'n'
}
if(!$safe) {
print('Gojira!'); // this is seen in the migration ui
//die(); // this is ignored
return FALSE; // this is ignored
}
// allow parent to skip a row
if (parent::prepareRow($current_row) === FALSE) {
return FALSE;
}
}
Here is the error I see on the migration ui page:
Migration failed ... General error: 1366 Incorrect integer value: 'n' for column 'sourceid1' at row 1
Please help.