1. Call: /block/add/advanced_block
  2. Add a layout and open the DROWL paragraph settings

Update: The library is attached after the first paragraph/layout is added. So we need to attach it if any paragraphs field is present in the entity form instead of attaching it only to the paragraphs edit form.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thomas.frobieter created an issue. See original summary.

thomas.frobieter’s picture

Issue summary: View changes
anybody’s picture

Confirming! Just had the same issue!

anybody’s picture

Title: Paragraphs settings styling library isnt attached while creating a new custom block » Paragraphs settings styling library isnt attached if creating a new custom block
anybody’s picture

Title: Paragraphs settings styling library isnt attached if creating a new custom block » Paragraphs settings styling library isnt attached if creating a new custom advanced block (with paragraphs)
Assigned: Unassigned » thomas.frobieter
thomas.frobieter’s picture

Assigned: thomas.frobieter » anybody

I had already suggested a more general hook to solve this, which worked perfectly fine, but you didn't liked it :P so.. your part.

OR its not released yet and we have it in DEV.. I am not entirely sure..

Update: Checked it, we've release the new hook with 4.1.10:

/**
 * Implements hook_layout_paragraph_element_form_alter().
 *
 * @param array $element_form
 * @param \Drupal\Core\Form\FormStateInterface $element_form_state
 * @param array $parent_form
 */
function drowl_paragraphs_layout_paragraph_element_form_alter(array &$element_form, FormStateInterface &$element_form_state, array $parent_form) {
  // Add backend library form to layout_paragraphs form:
  $element_form['#attached']['library'][] = 'drowl_paragraphs/admin';
}

I don't know.. if this is not working again.. pfff...

anybody’s picture

Status: Active » Needs work

@thomas.frobieter see
#3253875: hook_layout_paragraph_element_form_alter not existing
#3199858: Create a custom hook to Alter the Layout Paragraph Element Form

TL;DR: The hook we used only existed in 1.x!

So this can't work with layout_paragraphs 2.x - no idea where that came from for 4.x or if we just forgot to update it.

So this is what we need:

/**
 * Implements hook_form_layout_paragraphs_component_form_alter().
 */
function drowl_paragraphs_form_layout_paragraphs_component_form_alter(array &$form, FormStateInterface &$form_state){
  // Add backend library form to layout_paragraphs form:
    $form['#attached']['library'][] = 'drowl_paragraphs/admin';
}

I'll prepare a MR. Already can confirm it works for nodes and blocks.

anybody’s picture

Status: Needs work » Reviewed & tested by the community

  • 19a379f committed on 4.x
    Issue #3274593 by Anybody: Paragraphs settings styling library isnt...
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Fixed! Will be shipped with 4.2.18!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.