CE6700 – Widget XY cannot contain widgets of type placeholder

0
hi,  Im using Mendix Studio Pro 10.24.9. im just getting started with the Mendix platform – so the error is probably on my side....    So im created some custom plugable Widgets with  "@mendix/pluggable-widgets-tools": "10.15.0".   One of the widgets i create has some Slots = property-type=="widgets".  <properties> <propertyGroup caption="Slots"> <property key="slotHeader" type="widgets" required="false" > <caption>header</caption> <description>Slot for the header</description> </property> <property key="slotDefault" type="widgets" required="false" > <caption>default</caption> <description>Slot for the content</description> </property> </propertyGroup> in a plain new project i was able to import the widgets and place it in a Layout. Put a "Main" placeholder in der "default"-slot and it just works.   But now i was moving to another project. where i wanted to integrate my new pluggable widgets. Now im getting an Error "C6700 – Widget XY cannot contain widgets of type placeholder". Even wen just created an new unused layout and added my widgets... as soon as i add the placeholder im getting this error.   What can i do to fix this?
asked
3 answers
1

The error is not caused by your widget implementation. It happens because the app is running in React Migration modeand still relies on legacy Dojo layout behavior, where Placeholders are restricted to layouts only. After switching the project to React-only, the Placeholder works as expected and the error disappears.

 

If the issue is resolved, could you please close the post? This way, others who run into the same problem can immediately see the solution.

answered
1

A Mendix Placeholder can only be used in a Layout to define where page content goes. It is not a normal widget, so it cannot be placed inside another widget’s slot that allows child widgets. When you try to put a Placeholder into a pluggable widget slot, Studio Pro checks the rules and throws the C6700 error. You could try keeping the Placeholder in the Layout and placing your pluggable widget inside that Placeholder instead. If you need a reusable structure with editable content, use Layouts + Placeholders, and treat your pluggable widget as a normal widget inside the layout, not as something that contains a Placeholder itself.

answered
0

We just found out, that this issue is only appearing when working in an Mendix 9 Project, that was upgraded to Mendix 10 and using the react client in Migration mode and there for stil using older  Dojo component.

After switching to react only everything works.

answered