I have paragraph type something columns where you can assign block + text. Form Block should be displayed left of the text. It all worked fine before upgrading to 8.3.7 from 8.2.6. Now text block gets displayed but form block does not.
Is there something wrong with paragraphs module?

Comments

matjaz_zavski created an issue. See original summary.

miro_dietiker’s picture

Status: Active » Postponed (maintainer needs more info)

We have great test coverage and Paragraphs works fine.

Might be customization or some other contrib module interfering.
With the information provided, we can not reproduce.

I'd recommend you try to reproduce the problem with a minimal setup after a fresh install of Drupal 8 + Paragraphs...
And then hunt the differences to identify the origin that break it.

jproctor’s picture

I have a little more information, though I have not tried it on a clean install (I understand why it's necessary for debugging, but it is really unhelpful advice for people who are just trying to get their work done).

Drupal core 8.5.5, Paragraphs 1.3.0.

Given:

  1. example/src/Form/ExampleForm.php defines class ExampleForm.
  2. example/src/Plugin/Block/ExampleBlock.php defines class ExampleBlock, annotated with admin label "My Example Form" and showing only that form.
  3. Paragraph type "Block" has one field, field_block, which is a reference to a Block. Its display is set to rendered entity.

If I add one of those paragraphs to a page, I cannot select "My Example Form". It is not available.

If I place that block on a page using the Block layout interface, it shows the form correctly. The form and the block work as intended.

If I edit a page where the block is visible, "My Example Form" is available to use in my paragraph, and it is rendered correctly when I save the page (in addition to where I have placed it using Block layout).

If I edit a page where the block is not visible, "My Example Form" is available to use, but it is not rendered when I save the page.

If I disable or remove the block from the Block layout interface, it is no longer available to use. If it was previously selected, it shows as "- Restricted access - (myexampleform)"

At least in case of blocks (possibly other config entities also?), Core seems to be preventing the referenced entity from being rendered by Paragraphs unless it's already configured to exist on that page. That sounds like the kind of thing that could have been considered a content access issue and closed in a security patch.

My immediate workaround is to add that block to a hidden region. If there's a better approach (some property I can set on the form or the block, or a behavior plugin, or something else), I'm happy to try it.

miro_dietiker’s picture

Did you try using https://www.drupal.org/project/block_field

If you need a testing environment, you can create Drupal instances easily with https://simplytest.me/