I'm not sure if this is a combination of user error/ui or a bug.
After installing a couple of modules which integrate with Rules the block visibility options blow out significantly to almost 30 horizontal tabs. Quite a few of these only provide the negate option and there are often double ups (node type, entity bundle etc), aside from the obvious confusion this causes I believe that there are conflicts occuring which in my instance makes block visibility impossible.
Attached is a screen capture of my block visibility options.
Also by default a block is not visible if it is created or edited after rules is installed.
I have used both Alpha1 and dev in core 8.1.x, 8.2.0-beta1 and 8.2.0-beta2
Comments
Comment #2
yasSame here, this raises two problems;
1) UI - as @dkre attached, totally those tabs confuse us. The wording "Negate the condition" is hard to understand. Maybe that means to revert from TRUE to FALSE or FALSE to TRUE, but why don't we use "Enable the condition" and should implement as it is since from a user perspective, s/he want to enable only the limited conditions if necessary.
2) Function - as @dkre mentioned, "Also by default a block is not visible if it is created or edited after rules is installed." This is more critical problem for me. If I edit an existing block and save it, Rule module doesn't look respect the checked "Negate the condition" options. I tried to export the config data from "Single Export" and it includes all the rules option entries in YAML config data with appropriate data such as "negate: 1", however it doesn't work.
I am using core 8.3.x and rules-8.x-3.x-dev.
Comment #3
acrosmanRan into this after updating to Drupal 8.2 this morning. Blocks that are supposed to appear on all pages are picking up a dependency on Rules, a whole collection of additional constraints, and not appearing at all after block save. I updates the site's config by hand to remove the dependency and remove the extra constraints and then re-imported the configuration and it resolved the issue (until the next time we want to change a block).
The page title block's config became:
Once I removed
and all the visibility constraints that start:
I could reload the config and get the blocks.
Comment #4
tim.plunkettThis is because rules condition plugins do not provide any config schema.
#2811519: Blocks do not appear after being placed with the Rules module enabled (or other missing schemata for Condition plugins) should fix the problem generically.
Comment #5
ckaotikTim's already posted the cause and core's workaround. Rules should definitely provide this schema, however the
condition_plugindata type should instead becondition.plugin(see the list of core data types). I wonder if we're able to use a placeholder here, or if we'd have to change the naming for that (i.e.rules.user_has_roleinstead ofrules_user_has_role):Comment #6
tim.plunkettSee also #2633232: Missing fallback plugin configuration schemas
Comment #7
websiteworkspace commentedThis bug is catastrophic and makes the D8 rules module unusable.
See:
https://www.drupal.org/project/rules/issues/3019965
Comment #8
tr commentedWell then perhaps you can review #4 and #5 and provide feedback.
The original poster's issue was fixed by #2811519: Blocks do not appear after being placed with the Rules module enabled (or other missing schemata for Condition plugins), and the current issue remains open in order to add condition schemas to Rules. #4 and #5 differ on what that should be, so if you want to help you can investigate the correct schema to use here and provide a patch.
And how does this relate to #3019965: rules module - after install, any block re-config causes block to disappear, unrecoverably? If it's the same, why did you open a new issue?
Comment #9
tr commentedComment #10
socialnicheguru commentedComment #11
socialnicheguru commentedPer #5 and #3259453: Rename all Rules events
I think it should be:
Here is a patch with this new syntax.
Not sure if this is the right way. Please check given the linked issue and #5.
Comment #12
socialnicheguru commentedplease disregard my patch. as stated here the renaming applies to events not conditions or plugins.
Comment #13
tr commented