-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layouts: Disabling Main page content has no effect #5808
Comments
Confirmed. (If you fully remove the block it doesn't show, if you disable the block it still shows up). |
I confirm that I have encountered this behavior also |
We looked at this with @jjmonterey after the weekly meetings this week. This seems like it might be a problem that quite a few people would encounter, but not necessarily recognize as a bug. It's pretty easy to work around the problem, but could be very confusing to people. Has anyone had a chance to look at this and see what is causing it and/or if it's an easy or difficult fix? |
I vaguely recall something about this being by design (@docwilmot or @jenlampton might know more about this). Something about not allowing people to "shoot themselves on the foot". I think that we should first figure out if there is a legit use case to allow the main content block to be hidden*. In other words, is the issue here an actual bug (are people actually trying to hide the main content block), or simply a matter of inconsistency (the action to disable exists because it is available for all blocks in general, yet does nothing for this specific block). So our approach should be:
My quick 2c. *@kswan, @jjmonterey, @stpaultim can you guys please outline your use case for wanting to disable the main content block? |
...I just though of a use case: when you want to replace the main content block in |
@klonos Yes, the use case you described is the one that we had in mind. During office hours @jjmonterey demonstrated that after creating a Layout for a type of node and implementing field blocks, he tried to disable the main content block to prevent the layout from displaying two versions of the same node. To make this work, he had to "hide" all the fields on the default node display mode. Very weird. |
Is selecting a different display mode for the layout possible? |
Maybe an oversight when the option to disable the blocks was introduced? |
Not possible, but that's what #5774 proposes if I'm not mistaken. |
Adding a custom display does not override the default display, the default main content block will display even if it is disabled. Disabling the main content block does not make a difference Removing the main content block renders the desired display Disabling the main content block AND hiding the fields in the default display also renders the desired layout In Drupal using Display Suite layouts Display Suite creates a custom layout in the CONTENT Section only although other custom regions can be displayed or disabled. The advantage of being able to render a custom layout inside the content region is that a Boxton Layout could be used almost exclusively. It seems to me that selecting a custom Display Mode should immediately bring up a configure layout screen to add a custom layout, since creating a custom display mode will use the default layout if it doesn't specify a custom layout - somewhat defeating the purpose of a custom display mode. |
Yes, this is the use case that resulted in this issue. A contributing factor is the note shown on the Main page content block that states "This block may be required for this page to work properly." Due to this note, I was hesitant to remove the block and thought it safer to just disable it. Since disabling the block had no effect, I removed the block and the layout works fine. |
Description of the bug
When managing blocks on a node page layout, if the Main page content is disabled, the content is still displayed on the node page.
Steps To Reproduce
To reproduce the behavior:
Actual behavior
The Main page content is displayed even though it is disabled.
Expected behavior
The disabled block should not be displayed.
Additional information
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: