Context module doesn't work with Third Party Settings when you add a block via context it doesn't create associated block config entity.

Because of this, we can't integrate context module with Menu Multilingual and at the same time use third party settings. See related issue #2956990: Settings no longer stored as third party settings.

I can add them directly to this config, but then it's not possible to delete these custom settings during my module uninstall process:

      'blocks' =>
      array (
        'f1e391e6-942d-4d38-ae87-570103a4e8f8' =>
        array (
          'id' => 'system_menu_block:account',
          'label' => 'User account menu contexttt',
          'provider' => 'system',
          'label_display' => 'visible',
          'level' => '1',
          'depth' => '0',
          'region' => 'header',
          'weight' => '0',
          'custom_setting' => 'value',
          'context_mapping' =>
          array (
          ),
          'theme' => 'bartik',
          'css_class' => '',
          'unique' => 0,
          'context_id' => 'test',
          'uuid' => 'f1e391e6-942d-4d38-ae87-570103a4e8f8',
        ),
      ),

The question is, what's the best way to add my settings to context's blocks config?

Comments

kovden created an issue. See original summary.

matsbla’s picture

Issue summary: View changes
Related issues: +#2953766: Provide a Configuration Schema
matsbla’s picture

Status: Active » Closed (duplicate)
jeroent’s picture

Status: Closed (duplicate) » Active

Re-opening since #2953766: Provide a Configuration Schema did not fix this issue.

jeroent’s picture

Category: Support request » Feature request
jeroent’s picture

Status: Active » Needs review
StatusFileSize
new5.16 KB

I tested this patch with menu_multilingual. In theory this should also fix block_class and context integration but I didn't test that.

The patch attached calls hook_form_block_form_alter in the context block forms. So modules like menu_multilingual and block_class that are implementing hook_form_block_form_alter() are also called when editing blocks in a context.

Status: Needs review » Needs work

The last submitted patch, 6: 2992000-6.patch, failed testing. View results

jeroent’s picture

Status: Needs work » Needs review
ilgnerfagundes’s picture

I applied the patch and did some tests and for me it's working.

paulocs’s picture

Status: Reviewed & tested by the community » Needs work

Patch needs a re-roll.

deaom’s picture

Status: Needs work » Needs review
StatusFileSize
new5.17 KB
new3.95 KB

Did not test the patch, just re-rolled it, so it needs additional review.

jeroent’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC, since the patch was only rerolled.

paulocs’s picture

Status: Reviewed & tested by the community » Needs review

I'm setting back to NR because I'm not sure what #9 pointed with the screenshots attached.
We need a more consistent review.

I'll see if I can review it later.

paulocs’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for it.
Patch looks good.

  • paulocs committed 61af22a on 8.x-4.x authored by DeaOm
    Issue #2992000 by DeaOm, JeroenT, ilgnerfagundes, paulocs, matsbla,...
paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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