I have some blocks set with the core block layout as well as a context that sets some other block with "Include blocks from Block layout" checked.

when viewing a page with this context, the correct blocks are displayed but blocks that are weighted from the core block form are not in the correct order.

thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

loze created an issue. See original summary.

himanshu_sindhwani’s picture

Assigned: Unassigned » himanshu_sindhwani

I will have a look on this issue.

loze’s picture

I have a little more info.
What appears to be happening for me is the Main content bock (set with core) always has a weight of 0, regardless of the weight given to it from the core UI, but only when the context is active.

For example in the core ui content region I have:
- Block A
- Main Content Block
- Block B
- Block C

In my context I have a block reaction, and block placed in other regions (not content region) The content region is empty in my context.
But when viewing the page the content region displays as

- Block A
- Block B
- Block C
- Main Content Block

When I disable the context it displays correctly.
I can get around this if in the core UI I force the weight of blocks B and C to be more than 0.

Hope that helps. Thanks.

himanshu_sindhwani’s picture

Assigned: himanshu_sindhwani » Unassigned

Got busy in some other work. Will have a look at it sometimes after. Unassigning myself until then.

paulocs’s picture

Hello @all,

Here is a patch. Please review it.

DeaOm’s picture

Hi, I could reproduce the issue and once the patch was applied it corrected the problem with the main system order. I just corrected coding standards, so new patch added.

  • paulocs committed cf88744 on 8.x-4.x
    Issue #3156610 by DeaOm, paulocs, loze: Core block weight not respected...
paulocs’s picture

Status: Needs review » Fixed

Fixed in dev branch.

Thanks @all!

Neslee Canil Pinto’s picture

@paulocs, thanks. Much needed one👍🏻

Status: Fixed » Closed (fixed)

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