FatalError: Value cannot be null. Parameter name: g

‚ÄčThis error can have a variety of causes, but in this particular circumstance it is extremely difficult to diagnose. For some reason your pages don't propagate or get created in target variations sites and you only get the above error if you go digging around in the ULS logs after tweaking a few logging parameters. If you are just doing an import of a content migration package you have a better chance of seeing this error message without having to go digging. The error may also be apparently intermittent.

The problem is that it is not sufficient to specify Type="User" for these fields (the UI equivalent field type is "Person or Group"). You also need to add an attribute List="UserInfo" to get it to work properly. If you miss this out it will fail at the import step if the field has been populated. If the field is left blank the import will work, which can give rise to confusing behaviour when you are trying to diagnose the problem.

So your field definition should look something like this:

<Field ID="{67ef9e1a-94c7-4dc4-93f9-7ec43bcd0830}" Type="User" List="UserInfo" Name="MyCustomUserField" DisplayName="MyCustomUserField" Group="My Custom Columns"></Field>

Great. Now your import will work without error whether the field is populated or not. In either case, when you import the field it will be empty in the target site. How interesting. Perhaps the developers thought it would be a bad idea to try to import these fields in a site that might belong to a different farm where the users didn't exist. It's a shame that it breaks when a field is populated even though it is discarded anyway.