🐛 | Paragraphs Previewer | Preview not working when using layout builder on full content view mode on content type
🇨🇷Costa Rica keboca
🐛 | Paragraphs Previewer | Preview not working when using layout builder on full content view mode on content type
🇨🇷Costa Rica keboca
I had the same problem, but I've found a way to solve it (at least for me). Basically, I added a new \Drupal::moduleHandler()->alter()
right after the cloned parent renders the parent field within the
\Drupal\paragraphs_previewer\ControllerParagraphsPreviewController::paragraphsPreviewRenderParentField
method.
It allows me to alter the "$parent_view_mode" variable in order to render the same way as the module does but using another view mode that I've created only to render the correct field in the proper way. In a nutshell, I just rerun this line: $elements = $parent_clone->{$parent_field_name}->view('paragraphs_preview');