You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.
I'm trying to import some users and I have this modify in my business logic plugin:
publicfunctionmodifyImportRow($element, $map, $data)
{
// Map data to fields$fields = array_combine($map, $data);
// Initialize content array$content = array();
// Arrange your content in a way that makes sense for your pluginforeach ($fieldsas$handle => $value) {
$content[$handle] = $value;
}
$name = explode('', $data[2], 2);
$content['firstName'] = $name[0];
$content['lastName'] = $name[1];
// Set modified content$element->setContentFromPost($content);
}
The users are importing successfully, and the hook is running (I can ::log from it) but none of the modifications take effect. I'm not getting any errors (checked log files & craft_import_log table).
The text was updated successfully, but these errors were encountered:
You'll have to make some adjustments. ie. check for a particular field handle (name?) and get your manipulations inside the foreach loop. Are you importing into a table by chance?
I'm trying to import some users and I have this modify in my business logic plugin:
The users are importing successfully, and the hook is running (I can
::log
from it) but none of the modifications take effect. I'm not getting any errors (checked log files & craft_import_log table).The text was updated successfully, but these errors were encountered: