Hi all, I have been playing with the alpha release and found the following:
I created a context on a path /contact condition and placing blocks as reaction. I was experimenting with creating a different layout for the contact page.
I found I was unable to place the Site Branding block and that the contextual links (such as edit) were missing on the /contact context page.

Comments

PatrickMichael created an issue. See original summary.

joco_sp’s picture

I confirm, that this is still an issue.

I tested it also with the dev release and on node page.

vanvemden’s picture

Same problem here. Here's the log error message it creates:

Location: admin/structure/context/my_context_name/reaction/blocks/blocks/add/system_branding_block?_wrapper_format=drupal_modal&theme=mybootstrap

Message: Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "theme" for route "system.theme_settings_theme" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 199 of /var/www/html/drupal/core/lib/Drupal/Core/Routing/UrlGenerator.php).

bobooon’s picture

Status: Active » Needs review
StatusFileSize
new552 bytes

I am using a Zen base theme and have reproduced the exact issue. I have created a patch which excludes site branding block configurations from being customized within the context interface. It does fix the error and I am able to add site branding block within contexts. It may not be the "perfect" solution so I'll let the maintainer take over from here. Thanks.

gcarless’s picture

Patch worked great for me -- thanks!

steveoliver’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.x-dev

This applies to an upcoming release.

titouille’s picture

It's stange, but the patch from #4 work correctly when I add the site branding block on reaction, but problem re-appears when I try to edit the site branding block by clicking on the edit button.
In this case, $block_id is key like "143d5cee-abb2-422e-97c9-83a116829552".

If I retrieve the real id to compare, it work in both cases:

if ($this->block->getPluginDefinition()['id'] != 'system_branding_block') {

Edit: block is added to the list, but not displayed at all on the final page using context...

cslevy’s picture

StatusFileSize
new772 bytes

The patch from #4 adds the block in the context, but skips the configuration step. If you don't configure the Site branding block, then will not show up.
Also the edit won't work for the same reason, like @titouille mentioned.
The actual problem is that the form state doesn't contain the "block_theme". This is needed when the configuration form is built for the site branding. I created a patch to fix this issue. I added it generally, maybe will be necessary for other blocks as well

jonodunnett’s picture

Patch #8 worked for me. Thank you.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

#8 fixed the issue for me. This looks also like the right bugfix

hypertext200’s picture

#8 fixed the issue

tatan313’s picture

Patch worked great for me, thanks! Fixed the issue :D

giorgosk’s picture

#8 it gives a whitespace warning on applying but it does the job

$ git apply -v 2714917_fix_site_branding.patch
a.patch:11: trailing whitespace.
    
Checking patch src/Reaction/Blocks/Form/BlockFormBase.php...
Applied patch src/Reaction/Blocks/Form/BlockFormBase.php cleanly.
warning: 1 line adds whitespace errors.

please commit

szeidler’s picture

#8 gives me the whitespace warning, too.

It should be fine to commit. Panels, that was facing the same problem, committed the same approach just now: https://www.drupal.org/node/2709521#comment-11938080

utement’s picture

#8 whitespace warning, but it works.

Ready to commit.

  • cslevy authored 8623244 on 8.x-1.x
    Issue #2714917 by robphillips, cslevy, utement, jonodunnett, dawehner:...
boshtian’s picture

Status: Reviewed & tested by the community » Fixed
boshtian’s picture

Status: Fixed » Closed (fixed)