[SalesForce] Deployment of SiteDotComSites: Required field is missing: label

I've pulled all the metadata from a sandbox, and now as a sanity check, I'm trying to push it all back (via Force.com IDE) to the same sandbox.

It all seems to work apart from siteDotComSites metadata:

File Name:    siteDotComSites/Public_Portal1.site
Full Name:  Public_Portal1
Action:  NO ACTION
Result:  FAILED
Problem: Required field is missing: label

The package structure looks like this:

siteDotComSites\
    Public_Portal1.site
    Public_Portal1.site-meta.xml

The .site file appears to be a binary. The meta.xml contains:

<?xml version="1.0" encoding="UTF-8"?>
<SiteDotCom xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Public-Portal</label>
    <siteType>ChatterNetworkPicasso</siteType>
</SiteDotCom>

I haven't done any work on the sites part so don't know any details about what's supposed to be working. However the error message seems incorrect. I can see a label in the XML.

Is this unsupported metadata as described here?:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_unsupported_types.htm

If so why can I retrieve it? Should I just remove it from the package manifest?

Best Answer

Looks like it is a general migration tool limitation. Whenever you are trying to deploy a component (this case was a SiteDotComSites for us too) without its meta.xml, it will run into a deployment issue. It is especially annoying when you are using git or other version control system and trying to deploy the delta only. Therefore even if your metadata xml hasn't changed with your deployable component, you still have to include a dummy change in the meta file to work this migration tool limitation around.