Googled my problem and found the exact problem but with no answers.

After the upgrade to Winter '15 / Package.xml to 30.0, there are errors on my profiles Error: profiles/PROFILENAME.profile(12101,24):In field: layout - no Layout named FeedItem-Feed Item Layout found.

So I added the layout to my package.xml and project, and now I have a new error Error: layouts/FeedItem-Feed Item Layout.layout(FeedItem-Feed Item Layout):Layout must have at least 1 section

I have not been able to locate anywhere in the browser UI that this specific layout can be configured. The only option I see is to get rid of the layout from my project/package, refresh profiles from Salesforce server, delete the below-mentioned few lines of XMLs from each profile XML file and then deploy.

    <layout>FeedItem-Feed Item Layout</layout>

Am I the only one facing this problem? Isn't there any way I can simply refresh the profiles and deploy without interfering with the XMLs?


2 Answers 2


Occasionally, you'll run into issues like this with the Ant Migration Toolkit. It's really tedious, but the easiest way I have found is to manually modify the profile's metadata (perhaps multiple profiles) to remove the FeedItemLayout and any other layouts that may be problematic.

The tedious part comes in if you do any sort of refreshes of the profiles from a source org (like a development org or sandbox), when your profile changes are overwritten and you have to redo the FeedItemLayout fix.

If you haven't already, I strongly suggest you back up your work into a SCM like bitbucket, so that you can track each of these metadata changes you're making.


I run into little quirks like this all the time with continuous integration. As stated above, dealing with the issues over and over again gets really old. One thing you can do though, with a bit of ANT knowledge, is actually remove these lines from the XML and delete the "crap" during the build so that you don't have to keep going back over and over again to do the edits to get your deploy to work.

As an example, you should be able to use the code below to delete all your FeedItem stuff from your build. Add this to your build.xml and put a depends on your deploy target for delete_FeedItem_Layout. This should help you get on the right direction of using ANT scripts to control your deployments. The first target removes the reference in any profiles, and the the second actually deletes the layout during the deployment.

    <target name="remove_profile_references">
    <replaceregexp match="^  &lt;layoutAssignments&gt;\n &lt;layout&gt;FeedItem-Feed Item Layout&lt;/layout&gt;\n &lt;/layoutAssignments&gt;$" replace="" flags="gm" byline="false">
        <fileset dir="${metadata.root}\profiles" includes="**/*.profile" />

<target name="delete_FeedItem_layout" depends="remove_profile_references">
    <delete file="${metadata.root}\layouts\FeedItem-Feed Item Layout.layout"/>
  • Are there any new long term solutions/ actual fixes for this? (rather than adding the code above to the XML file) Any SF links for fixes would be much appreciated...
    – TheAdmin
    Jan 11, 2018 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .