2024-05-23 10:33:07,108 WARNING [GenericSetup.plone.app.registry:98][waitress-1] Field type myproduct.my_control_panel.controlpanel.RichTextFieldRegistry specified for record myproduct.my_control_panel.controlpanel.myrichfield cannot be exported
but I think it is due to the fact that it is not a known type. The content is exported, and the type is in the interface, so it should work anyway.
<record name="my.addon.interfaces.IMySettings.project_description" interface="my.addon..interfaces.IMySettings" field="project_description">
<value><p>This is my project description</p></value>
This is strange, because the export should include a serialization of a RichTextValue object and not its output or raw value. My export using the registry is:
<records interface="myproduct.controlpanels.my_control_panel.controlpanel.IMyControlPanel" prefix="myproduct.my_control_panel">
value key="nmyfield">
RichTextValue object. (Did you mean <attribute>.raw or <attribute>.output?)
</value>
</records>
with portal_setup:
<record name="myproduct.mycontrol_panel.myfield" interface="myproduct.controlpanels.mycontrol_panel.controlpanel.IMyThemeControlPanel" field="myfield">
<value><p>This is my project description</p></value>
</record>
basically, the html of the field changes from (working):
<div class="mb-3 field fieldname-form.widgets.myfield widget-mode-input " id="formfield-form-widgets-myfield" data-fieldname="form.widgets.myfield">
<label class="form-label" for="form-widgets-myfield">
My Field
</label>
<textarea name="form.widgets.myfield" class="form-control">html bla bla</textarea>
to (not working):
<div class="mb-3 field fieldname-form.widgets.value widget-mode-input empty " id="formfield-form-widgets-value" data-fieldname="form.widgets.value">
<label class="form-label" for="form-widgets-value">
My Field
</label>
<textarea name="form.widgets.value" class="form-control"></textarea>