Ibexa DXP Discussions

Community discussion forum for developers working with Ibexa DXP

DOMDocument::loadXML() error on Content Type edit

I`m trying to update an existing Content Type by adding a new field type, then I get this error:
“Warning: DOMDocument::loadXML(): invalid character in attribute value in Entity, line: 2”

The error shows no metter the new field type is.
There are about 450 elements of this content type.

I also tried this using the kaliop migration and I get the same error in the console even if I choose to delete drafts.

Is there a way to debug this in more details so I can fix this ? I suspect that some content of this content type has something wrong, maybe a missing image or something, but it should be a way to see exactly what’s wrong.

I appreciate any help.

You should be able to find more information using the Symfony developer toolbar (in dev mode) or in the log files (/var/logs/*.log)
https://doc.ezplatform.com/en/latest/guide/devops/#logging-and-debug-configuration

Yes, you’re right, but I’ve already checked this log file. There were a lot of “User Deprecated” lines, and after removing them, the only ones that remains are some warnings: “Translation not found” but nothing about the content type I`m trying to update or any wrong content of this type.

What about the Symfony developer toolbar? It might give you a stacktrace, which may help. If not, it’s tricky indeed.

Hi. If this appears when editing Content Type, then my guess is that some default value of a Field Definition contains erroneous XML. It’s unlikely that it is related to any of your 450 Content items. I would start by looking into some RichText Field Definition (ezrichtext). At this time default values for RichText fields are not supported in eZ Platform, so you need to investigate database rows (ezcontentclass_attribute table).

Thank you for your answer.

I finally found the issue and you are nearly right. In ezcontentclass_attribute table in data_text column, inside the UserComment attribute there was a weird character: (character code <0x12> or <0x17>). And of course this was read as <0x12> which is an invalid character when processing the XML content fields (this character was found only in ezimage fields) of my content-type.

I coudn’t find the content itself to see and change this value, so I updated them manually in the database. It took me a few hours until I found this solution, because there were no logs or explicit description about this error, but if anyone have a similar issue maybe this will help.