Issues with upgrading to use registry.xml

Hello,

I was wondering if you could help me. I am trying to upgrade a Plone 4.3.9 site to Plone 5.0.4.

The site(s) that I have are based on old Archetypes and portal_skins setup.

I'm following the instructions on http://docs.plone.org/manage/upgrading/version_specific_migration/p4x_to_p5x_upgrade.html and I've got a problem with registry.xml.

I've tried to use the TTW option in attempting to upgrade my theme. The trouble is this is broken unless you apply the Barceloneta theme. The Plone Legacy bundle also was broken for me as it didn't handle previous registry conditional statements.

I've create a registry.xml file, which seems to 'occasionally' work. Though I sometimes get a strange error when my whole site is rendered as Javascript rather than the Content-Type: text/html; charset=utf-8!!
Is there anyway to validate the registry.xml file?
When the site breaks like this there is no fix and I have to roll back. The logs only show this error: Plone 5 upgrade failing on ++resource++plone.css

I was wondering if someone could help me write up some documentation to show a before and after view of jsregistry.xml and cssregistry.xml to registry.xml for those trying to upgrade from Plone 4 to 5. I don't think I am in a unique case and I don't think the current documentation covers the scenario of "I have a simple portal_skins theme, I don't use LESS or SASS, but I wan't to upgrade to Plone 5"

Ideally I would like to see some documentation which contains a classic jsregistry.xml/cssregistry.xml file (like the snippet below) and what it should look like now in the registry.xml.

I have found this part of the upgrade pretty tricky and it really has made me lose some hair... therefore is someone can point me in the correct direction I would like to write this up to potentially help others.

Cheers,
Adam


jsregistry.xml snippet

<javascript cacheable="True"
	compression="none"
	cookable="True"
	enabled="True"
	conditionalcomment="python: context.portal_type == 'CustomType'"
	id="++resource++theme.javascripts/custom-type.js"
	inline="False"/>
<javascript cacheable="True"
	compression="none"
	cookable="True"
	enabled="True"
	conditionalcomment="lte IE 8"
	id="++resource++theme.javascripts/respond.js"
	inline="False"/>
<javascript cacheable="True"
	authenticated="True"
	compression="none"
	cookable="True"
	enabled="True"
	id="++resource++theme.javascripts/theme-authenticated.js"
	inline="False"/>
<javascript cacheable="True"
	compression="none"
	cookable="True"
	enabled="True"
	id="++resource++theme.javascripts/theme.js"
	inline="False"/>

...

cssregistry.xml snippet
...

<stylesheet title="" applyPrefix="False" authenticated="False"
	cacheable="True" compression="safe" conditionalcomment="" cookable="True"
    enabled="False" expression=""
    id="++resource++theme.stylesheets/main.css" media="screen"
    rel="stylesheet" rendering="link"/>
<stylesheet title="" applyPrefix="False" authenticated="False"
    cacheable="False" compression="safe" conditionalcomment=""
    cookable="False" enabled="False" expression=""
    id="++resource++theme.stylesheets/grid960.css"
    media="screen and (min-width: 1px)"
    rel="stylesheet" rendering="link"/>
<stylesheet title="" applyPrefix="False" authenticated="False"
    cacheable="True" compression="safe" conditionalcomment="lt IE 9"
    cookable="True" enabled="False" expression=""
    id="++resource++theme.stylesheets/ripeIEFixes.css"
    media="screen"
    rel="stylesheet" rendering="link"/>
<stylesheet title="" applyPrefix="False" authenticated="False"
    cacheable="True" compression="safe" conditionalcomment=""
    cookable="True" enabled="False" expression=""
    id="++resource++theme.stylesheets/customprint.css"
    media="print"
    rel="stylesheet" rendering="link"/>

...