Ok thanks. i had some problems with parts when i upgraded my application from 6.4 to 6.11. Turns out Enonic doesn’t support UTF-8-BOM encoded HTML files after 6.6 (i think)
I previously figured out that Enonic XP doesn’t support BOM encoding in the XML files. After 6.5 it turns out the same applies to the HTML files, except you dont get en error like with the XML.
XML error with BOM encoding:
12:00:33.238 ERROR c.e.x.c.i.s.c.ContentTypeRegistry - Error loading content typ
e: ‘com.company.myapp:page’
com.enonic.xp.xml.XmlException: Content is not allowed in prolog.
at com.enonic.xp.xml.parser.XmlObjectParser.parse(XmlObjectParser.java:8
5)
With BOM encoded HTML files no errors are displayed. The part is still displayed however you are unable to select it Content Studio(after you reload the page. )
I was asking about the vanille starter because i experienced the same issues as i did with with my application (based on the vanilla starter) when changed from 6.4 to 6.11 in gradle.properties. The error message i posted occurs when setting a content-type xml file to UTF-8-BOM (this is the default when creating XML and HTML files in Visual Studio) encoding:
The contents of your part are covered by that dropdown menu
Can you please copy-paste it here? I just want to make sure encoding is the only problem there.
Also, is there a special reason why you want to use UTF-8-BOM and not standard UTF-8?
As far as I know, BOM is known to cause issues in UTF encoding, so I think you should simply get rid of this and go with standard UTF (unless you have a good option not to). Here’s the solution to changing this setting in Visual Studio:
“open File menu and select “Advanced save options” and there you should select “UTF-8 without signature” (and that also answered your last question :). Yes “UTF-8 without signature” is same as without BOM”
Thank you, however i am aware of this in regards to XML files.Whats “new” to me is the same problem extending to HTML files in XP. Anyway the same solution applies to HTML files. Thanks