Hey. I have a part with a form that sends a post request to itself by using the component url. This worked great until I placed it inside a layout with some other stuff and created a fragment of it in content studio. Now I get this error: “Expected component to be a LayoutComponent: FragmentComponent” when I post the form. I am not sure how to interpret this error message, or what to do.
Hmm… Suspecting you may have discovered a limitation for parts in layouts that are converted to fragments… I assume the part is working fine when it is just placed in a layout, or made into a fragment itself?
A quickfix would be to move the “post handling” logic to a service/ instead!
Haven’t tried making it a fragment by itself, but it works in a layout. I thought about making a service, but I felt it was kinda overkill. I guess I’ll do it anyway then
I have reproduced the bug and registered an issue to fix it in 6.14.
I guess the workaround for now is to use a service, or not creating the fragment if that is an option.