In 8.9.0 version, I was getting pages, roles & content types settings at admin/structure/block/manage/mainmenu but after upgrade to 8.9.2 version, new options like "Node is sticky", "User is blocked", "Node is published" etc. are showing. I am not getting where I can configure page urls as I did in 8.9.0.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devendra Mishra created an issue. See original summary.

Devendra Mishra’s picture

FileSize
40.82 KB
Devendra Mishra’s picture

Priority: Normal » Major
rinckoar’s picture

I have the same issue, please how can I configure visibility per page o node type in 8.9.2.

shailja179’s picture

Hi @Devendra Mishra,
I can see these options even in 8.9.2 version.
Can you give the steps to reproduce this issue?

Devendra Mishra’s picture

Hi Shailja, Thanks for helping!!
I was using 8.9.0 version, then I have ran drupal update using composer.json and now drupal version is 8.9.2. After drupal upgrade, blocks visibility options have changed. Now I can see "Node is sticky", "User is blocked", "Node is published" options instead of pages, roles & content types settings.

shailja179’s picture

Can you elaborate that which theme, which block and in which region you were adding this block?
Because i updated my Drupal version to 8.9.2 and could not reproduce your issue.
As i have attached screenshot of block page in 8.9.2, these options are available there.

rinckoar’s picture

Hi Shailja, i have the same problem. I tried to put new blocks in different regions and the same happens in all of them, even when modifying old blocks only the options "Node is promoted" "the user is blocked" Entity is new "" Node is sticky "" Node is published "" data comparison " are displayed.

It also happened to me when updating to drupal version 8.9.2

Janner’s picture

+1 for the Content Type, User Role, and Page visibility options disappearing after upgrading to 8.9.2.

Fortunately, existing blocks appear to still respect the options that were set previously.

However, these options are simply not listed when editing an existing block or adding a new one.

In my case the upgrade was from 8.9.1 and the visibility options mentioned by some in this thread as being new were present for me previously.

I'm using the Bootstrap4 theme.

The behaviour is present in all block regions and for all types of block (core, module, or custom).

shailja179’s picture

I could not be able to reproduce this issue. I have updated the version to 8.9.2 but no luck.
Attaching screenshots of version and block visibility.

peter63’s picture

I also have "lost" the pages filter for blocks with 8.9. currently have no way to restrict block visibility

Only local images are allowed.

pameeela’s picture

This is coming from Rules module, it was a known issue should be fixed in core with #2958785: ContextDefinition isSatisfiedBy() check fails for context using inherited class. There was a new release of Rules on July 20, for those seeing this, did you update Rules at the same time as core? Can anyone confirm they only updated core?

pameeela’s picture

Project: Drupal core » Rules
Version: 8.9.x-dev » 8.x-3.x-dev
Component: block.module » Rules Core
Issue tags: +Bug Smash Initiative
FileSize
52.15 KB
40.42 KB

I can confirm that the core tabs display on 8.9.2 with Rules 8.x-3.0-alpha5:

But not with 8.x-3.0-alpha6:

So I think this should go over to the Rules queue?

TR’s picture

Janner’s picture

Bingo!

The latest Rules release was indeed the culprit.

Having applied the patch mentioned above, all block visibility options are available again.

Thanks for figuring this one out for us.

Devendra Mishra’s picture

Excellent!!
Patch mentioned above is working, now I can see all the block visibility options.
Thank you very much for helping.

rinckoar’s picture

Thanks for the help, the patch works perfect

TR’s picture

Status: Active » Fixed

Patch in #2927132-15: List of conditions includes Core conditions which do not work with Rules was committed. If you encounter this problem please apply the patch or update to the -dev version of Rules.

scott.whittaker’s picture

Thanks for figuring this out, only lost a few hours trying to debug. Uninstalled Rules, all better now.

Stephen Ollman’s picture

Both patch or 8.x-3.x-dev resolve the issue.

Status: Fixed » Closed (fixed)

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

jukka792’s picture

FileSize
57.3 KB

I installed the Rules dev version and the Drupal block visibility settings have now "data comparison" and "data value is empty" -options.
Is it intended that rules module adds these new options to all block visibility settings?

jonathan1055’s picture

Yes I also see these Rules tabs in addition to the Core ones.

Without Rules installed
without rules

With Rules installed
without rules

Is it intended that rules module adds these new options to all block visibility settings?

I don't think it is intended, or if it is, the conditions are not useable as there is no way to enable/disable them. Apart from the two 'data' tabs the rest are just empty except for a 'negate' checkbox.

Maybe a new issue should be raised, as this one was all about Rules accidentally hiding the Core conditions (and that is fixed now)

TR’s picture

Issue tags: -Bug Smash Initiative +Bug Smash Initiatived.

Re #22, #23:

That's a long-standing core issue, #2284687: Redesign UI for better management of block visibility

TR’s picture

Issue tags: -Bug Smash Initiatived. +Bug Smash Initiative
jonathan1055’s picture

OK thanks for linking that issue.
So just to be clear, are you saying that it is correct for the Rules conditions to be shown on these block visibility pages?

TR’s picture

No, I'm saying that Core needs to be selective about which conditions it shows - if Core can't use the condition, it shouldn't show it. Specifically, if the Block UI can't use the condition then the Block UI shouldn't show the condition. This is a problem not only with Rules conditions but with conditions provided by other modules, as described in that core issue. The Core block visibility list shows all @Condition plugins. Rules defines lots of @Condition plugins, as do some other contributed modules. The bock visibility UI should show only applicable conditions, as described in that Core issue.

Note that this was fixed in core at one point by #2958785: ContextDefinition isSatisfiedBy() check fails for context using inherited class, but it has evidently been broken again - I don't know where or by what, but this is a Core regression. It will take some work to find out how Core broke this and to revert/fix the Core commit that broke this.

There are also other Rules issues, like #2789051: Add schemas for Rules condition plugins, which potentially can contribute to a Core fix. But as far as I'm concerned, this problem has been around for many many years - it's not something that just started to happen - and needs to be fixed in Core, not in Rules.

jonathan1055’s picture

Thank you @TR for the clarity, that is really helpful.

This is a problem not only with Rules conditions but with conditions provided by other modules

Yes I had noticed that the four conditions provided by Scheduler module which I maintain also get shown on the block visibility tabs, and are likewise not useable.

this was fixed in core at one point

That is what I thought! This is the reason I was concerned that contrib had to make some changes now, and that we'd not been keeping up and had caused the regression.

I will follow those other issues, and try to help where I can.

jonathan1055’s picture

aiphes’s picture

Facing off this issue too but I have a working website which runs 8.x-3.0-alpha5, all others run 8.x-3.0-alpha6. All websites run on D896.
Difference is the same as screenshot in #23

jonathan1055’s picture

Thanks aiphes. I have just posted on the core issue #2284687: Redesign UI for better management of block visibility which is th cause of the problem.

naveen20430’s picture

#14 Working for me

ddhuri’s picture

Thanks #14 works for me with Drupal 8.9.6 and Rules 8.x-3.0-alpha6

admirernepali’s picture

Thanks #14 worked for me with Drupal 8.9.10 as well as 8.9.9 and Rules 8.x-3.0-alpha6

aiphes’s picture

Patch from #14 work on D8910 + 8.x-3.0-alpha6 on my Dev website.
Will do the same on prod websites to confirm.

WinkieWinkie’s picture

Patch from #14 worked on D8 version 8.9.10, on Production, was really thrown off with the missing Visibility options, then stumbled on this trail.

perfectcu.be’s picture

Google sent me here, but thanks to a pointer in the right direction from WinkieWinkie this patch from rules #issue 2927132 worked to restore path visibility in block configs.

theolem’s picture

Hi,
encoutering this issue again with Drupal 8.9.16 and Rules 8.x-3.0-alpha6. I can't see the core options for managing block display, on Rules ones.

The patch from #14 seems to have been commited, there was no need to apply it again on my side.

Any idea what changed ?

jonathan1055’s picture

The patch from #14 seems to have been commited,

Yes the patch mentioned in #14 (which is on #2927132-15: List of conditions includes Core conditions which do not work with Rules) was committed to Rules dev in July 2020. It is OK for me on 8.9.16 so in principle it is working.

jonathan1055’s picture

Just realised that you might have though that the commited patch was in the latest release. The patch was committed, yes, but that was on 25 July 2020. However, the alpha6 release was on 20 July, i.e. before the commit. There has not been a new Rules release since then, so you need to use the -dev version of Rules, or apply the patch to alpha6.

theolem’s picture

Oh yes you're right, that was it. Switched to dev and all good. Thanks a lot !

jptillman’s picture

Friendly reminder that the recommended package version on the Drupal Rules project page breaks a fundamental Drupal functionality nearly all site designers need, and has been posted there for more than a year now.

gatorjoe’s picture

Same issue here with Drupal 8.9.19. Switching to the dev version of Rules was the fix.